0

我正在尝试创建我的第一个 yeoman 生成器,当我运行 yo 来创建我的项目时出现以下错误。

npm ERR! install Couldn't read dependencies
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.14
npm ERR! file /Users/derek/Development/personal_projects/stylus-generator/work/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token }
npm ERR! File: /Users/derek/Development/personal_projects/stylus-generator/work/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/derek/Development/personal_projects/stylus-generator/work/npm-debug.log

我已经使用 jsonlint 验证了 package.json 文件。我还执行了 npm cache clean。package.json 文件可以在这里找到:https ://github.com/dereksnow/generator-simple-stylus/blob/master/package.json

有什么建议么?

4

1 回答 1

3

在我的 app/templates/_package.json 文件中的最后一个依赖项之后,我有一个逗号。我正在查看根目录中的 package.json,它没有任何问题。钱币!

于 2015-02-14T00:21:57.847 回答