Node中的节点模块安装错误(socket.io)

时间:2014-12-03 09:37:35

标签: javascript node.js sockets module socket.io

尝试在Node中安装socket.io会导致错误。 其他模块,如快递,工作正常。我已经尝试过重新安装节点,甚至在安装节点之前还要进行系统恢复。奇怪的是它上周工作,我第一次安装它。下面的代码来自通过NVTVS for Visual Studio安装socket.io,从终端执行时会发生同样的错误。我正在使用Windows 7 64位(6.1 build 7601)。 我也找不到他们在ws目录中引用的错误日志,因为没有。是否有人能够阅读此错误消息,或者之前遇到过此问题?

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 NodejsConsoleApp4@0.0.0 No repository field.
> ws@0.5.0 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)
> ws@0.4.31 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! ws@0.5.0 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the ws@0.5.0 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====

1 个答案:

答案 0 :(得分:1)

修正了它。我在系统路径中链接到'c:/ windows / system32 /',由于某种原因修复了它。