我正在尝试创建我的第一个yeoman生成器,当我运行你来创建我的项目时,我收到以下错误。
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缓存清理。可以在此处找到package.json文件:https://github.com/dereksnow/generator-simple-stylus/blob/master/package.json
有什么建议吗?
答案 0 :(得分:3)
我的app / templates / _package.json文件中的最后一个依赖项之后有一个逗号。我正在查看根目录中的package.json,它没有任何问题。喝!