-1
嘗試在節點中安裝socket.io會導致錯誤。 其他模塊,如快遞,工作正常。我已經嘗試過重裝節點,甚至在安裝節點之前系統還原到了。奇怪的是,它上週工作,我第一次安裝它。下面的代碼是通過NVTVS爲Visual Studio安裝socket.io,從終端執行時也會發生同樣的錯誤。我正在使用Windows 7 64位(6.1版本7601)。 我也無法找到它們在ws目錄中引用的錯誤日誌,因爲沒有。是否有人能夠閱讀此錯誤消息,或之前遇到過此問題?節點中的節點模塊安裝錯誤(socket.io)
Registry url: https://registry.npmjs.org/
Current Time: 03.12.2014 10:02:02
Last Refreshed: 03.12.2014 08:32:19
Number of Results: 115824
====Executing command 'npm install socket.io --save '====
npm WARN package.json [email protected] No repository field.
> [email protected] install c:\users\cyzla\documents\visual studio 2013\Projects\NodejsConsoleApp4\NodejsConsoleApp4\node_modules\socket.io\node_modules\engine.io\node_ modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> [email protected] install c:\users\cyzla\documents\visual studio 2013\Projects\NodejsConsoleApp4\NodejsConsoleApp4\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! [email protected] install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io" "--save"
npm ERR! cwd c:\users\cyzla\documents\visual studio 2013\Projects\NodejsConsoleApp4\NodejsConsoleApp4
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm
====npm command completed with exit code 1====
我不確定它會是什麼原因,但是當它發生在我身上時,我需要禁用Windows的用戶帳戶控制(UAC),它不允許下載某個文件。 – Talysson 2014-12-03 10:07:10
@Talysson我試過了,但沒有運氣。仍然得到相同的錯誤 – Idva 2014-12-03 10:33:50
你有Python安裝和PATH? WS需要它來編譯。 – Talysson 2014-12-03 10:35:19