簡體   English   中英

npm更新package.json引發錯誤

[英]npm update a package.json throw an error

我已經在Windows 7下安裝了節點v0.10.35的最新版本。該版本包括npm。

當我嘗試更新package.json時,收到以下錯誤:

ws@0.4.31安裝C:\\ Users \\ Giuliano \\ Downloads \\ Rich-Client-Music-Player-master(node-gyp重建2> builderror.log)|| (0號出口)

npm ERR! ws@0.4.31 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ws@0.4.31 install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR!     npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\NodeJS\\\\node.exe" "C:\\Program Files\\No
npm ERR! cwd C:\Users\Giuliano\Downloads\Rich-Client-Music-Player-master
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0

我必須承認我已安裝Microsoft Visual Studio 2013和Python 2.7.9作為此問題的建議。 另外,如果我嘗試安裝socket.io(npm install socket.io),則會收到相同的錯誤。 我已經附上了npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\NodeJS\\\\node.exe',
1 verbose cli   'C:\\Program Files\\NodeJS\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'socket.io' ]
2 info using npm@1.4.28
3 info using node@v0.10.35
4 verbose node symlink C:\Program Files\NodeJS\\node.exe
5 error Error: ENOENT, stat 'C:\Users\Giuliano\AppData\Roaming\npm'
6 error If you need help, you may report this *entire* log,
6 error including the npm and node versions, at:
6 error     <http://github.com/npm/npm/issues>
7 error System Windows_NT 6.1.7601
8 error command "C:\\Program Files\\NodeJS\\\\node.exe" "C:\\Program Files\\NodeJS\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io"
9 error cwd C:\Users\Giuliano\Desktop
10 error node -v v0.10.35
11 error npm -v 1.4.28
12 error path C:\Users\Giuliano\AppData\Roaming\npm
13 error code ENOENT
14 error errno 34
15 verbose exit [ 34, true ]

我不在Windows計算機上,但是您可以在此處嘗試一些解決方案例如運行:

$ npm cache clean

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM