为什么我不能用npm安装任何gulp依赖项?

时间:2015-06-22 01:43:28

标签: npm gulp

我的计算机崩溃了,现在根本没有安装包。

这是命令行中显示的内容:

npm install --save-dev gulp-autoprefixer
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-c
li.js" "install" "--save-dev" "gulp-autoprefixer"
npm ERR! node v0.12.0
npm ERR! npm  v2.10.1
npm ERR! file C:\Users\buddy\AppData\Roaming\npm-cache\readable-stream\1.0.33\package\package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token
npm ERR! File: C:\Users\buddy\AppData\Roaming\npm-cache\readable-stream\1.0.33\package\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!     C:\Users\buddy\Desktop\BuildTest\npm-debug.log

1 个答案:

答案 0 :(得分:2)

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.

告诉你需要知道的一切。您需要确保package.json是有效的JSON。

我建议通过http://jsonlint.com/来暗示它。

相关问题