跑步" taco创造"失败了"语法错误:意外的令牌ILLEGAL"

时间:2016-06-15 17:01:50

标签: taco

TACO新手,我跟随Getting Started with TACO-CLI。可悲的是,运行此create命令时出现错误:

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文件夹,以确保它适合您。

0 个答案:

没有答案