1. 程式人生 > >npm安裝時報錯---npm ERR! Windows_NT 10.0.16299

npm安裝時報錯---npm ERR! Windows_NT 10.0.16299

npm ERR!Windows_NT10.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

執行結束後,就可以正常安裝了。

有點坑.......