npm安装时报错---npm ERR! Windows_NT 10.0.16299

npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! file C:\Users\Admin\AppData\Roaming\npm-cache\code-point-at\1.1.0\package\package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token '/u0000' at 1:1
npm ERR! 
npm ERR! ^
npm ERR! File: C:\Users\Admin\AppData\Roaming\npm-cache\code-point-at\1.1.0\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 install的时候,控制台报了这样的错,显示编译package.json时出错,查了很多解决办法,检查package格式,也把node降低到比较低的版本,均没有解决。

最终解决方案:

npm cache clean

执行结束后,就可以正常安装了。

有点坑.......





你可能感兴趣的:(npm安装时报错---npm ERR! Windows_NT 10.0.16299)