1

TACO 新手,我正在关注TACO-CLI 入门。可悲的是,运行此创建命令时出现错误:

taco create hello

这是我得到的错误:

$ taco create hello

Downloading: taco-kits
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\kyle\AppData\Roaming\taco_home\node_modules\taco-kits\latest\package.json'
npm WARN latest No description
npm WARN latest No repository field.
npm WARN latest No README data
npm WARN latest No license field.

taco-kits downloaded and installed.
Error: Cannot find module 'C:\Users\kyle\AppData\Roaming\taco_home\node_modules\taco-kits\latest\node_modules\taco-kits'
SyntaxError: Unexpected token ILLEGAL

我有这些版本的东西:

 npm 3.9.6
 taco 1.2.1
 node 6.2.1
 Windows 10 (latest updates)

我也尝试过使用最新的稳定版本的节点(4.4.5)并且没有任何乐趣。

事实上,'C:\Users\kyle\AppData\Roaming\taco_home\node_modules\taco-kits\latest\' 的内容不包含 package.json 文件。这是我在那里看到的:

node_modules
timestamp.txt

'C:\Users\kyle\AppData\Roaming\taco_home\node_modules\taco-kits\latest\node_modules\taco-kits' 包含以下内容:

LICENSE
TacoKitMetadata.json
node_modules
package.json
resources
tacoErrorCodes.js
tacoErrorHelper.js
tacoKits.js
templates
test

该文件夹中的 package.json 文件包含以下内容:

{
  "name": "taco-kits",
  "description": "Validated Kits metadata for taco CLI",
  "version": "1.2.0",
  "author": {
    "name": "Microsoft Corporation",
    "email": "vscordovatools-admin@microsoft.com"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Microsoft/TACO.git"
  },
  "bugs": {
    "url": "https://github.com/Microsoft/TACO/issues",
    "email": "vscordovatools-admin@microsoft.com"
  },
  "homepage": "http://taco.tools",
  "main": "tacoKits.js",
  "scripts": {
    "test": "mocha",
    "coverage": "istanbul cover --report json node_modules/mocha/bin/_mocha -- --reporter spec"
  },
  "dependencies": {
    "q": "^1.1.2",
    "taco-utils": "^1.3.3"
  },
  "devDependencies": {
    "mocha": "2.0.1",
    "istanbul": "^0.4.0",
    "should": "4.3.0",
    "taco-tests-utils": "^0.1.4"
  },
  "license": "MIT",
  "_id": "taco-kits@1.2.0",
  "_shasum": "7e9281a34e59cfb64234057e6ada10a99791a6ef",
  "_resolved": "https://registry.npmjs.org/taco-kits/-/taco-kits-1.2.0.tgz",
  "_from": "taco-kits@latest",
  "_npmVersion": "2.14.9",
  "_nodeVersion": "0.12.9",
  "_npmUser": {
    "name": "vsmobile",
    "email": "vscordovatools-admin@microsoft.com"
  },
  "dist": {
    "shasum": "7e9281a34e59cfb64234057e6ada10a99791a6ef",
    "tarball": "https://registry.npmjs.org/taco-kits/-/taco-kits-1.2.0.tgz"
  },
  "maintainers": [
    {
      "name": "vsmobile",
      "email": "vscordovatools-admin@microsoft.com"
    }
  ],
  "directories": {}
}

任何帮助,将不胜感激。

更新(已解决)

我能够通过删除 taco-kits 文件夹然后运行重新安装套件的taco kit list来解决此问题。我使用的 bash 命令如下(使用 bash):

rm -Rf /c/users/kyle/AppData/Roaming/taco_home/node_modules/taco-kits/ 
taco kit list

我建议先重命名该 taco-kits 文件夹,以确保它适合您。

4

0 回答 0