Mac无法安装npm / nodejs的socket.io?

我一直在寻找几个小时,我仍然没有回答这个问题。 我有Mac OS X版本10.6.8我从nodejs.org安装nodejs。 版本是v0.6.14。 我在terminal做了这个检查npm:npm –version。 npm版本是1.1.12之后,我试着npm安装socket.io,我得到这个错误…

pm http GET https://registry.npmjs.org/socket.io npm http 304 https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/socket.io-client/0.9.3 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/redis/0.6.7 npm http 304 https://registry.npmjs.org/redis/0.6.7 npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http 304 https://registry.npmjs.org/socket.io-client/0.9.3 npm http GET https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/ws npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http 304 https://registry.npmjs.org/ws npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/zeparser/0.0.5 > ws@0.4.11 preinstall /Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws > make execvp(): No such file or directory npm ERR! Error: ENOENT, open '/Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js' npm ERR! You may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com> npm ERR! npm ERR! System Darwin 10.8.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io" npm ERR! cwd /Users/NAME npm ERR! node -v v0.6.14 npm ERR! npm -v 1.1.12 npm ERR! path /Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js npm ERR! code ENOENT npm ERR! message ENOENT, open '/Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js' npm ERR! errno {} npm ERR! ws@0.4.11 preinstall: `make` npm ERR! `sh "-c" "make"` failed with 127 npm ERR! npm ERR! Failed at the ws@0.4.11 preinstall 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! make 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! npm ERR! System Darwin 10.8.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io" npm ERR! cwd /Users/NAME npm ERR! node -v v0.6.14 npm ERR! npm -v 1.1.12 npm ERR! code ELIFECYCLE npm ERR! message ws@0.4.11 preinstall: `make` npm ERR! message `sh "-c" "make"` failed with 127 npm ERR! errno {} npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/NAME/npm-debug.log npm not ok 

PLS帮助!

强制使用安装

 npm install socket.io -f 

看起来像testing需要node-waf,而不是直接的库。 我希望他们最终解决这些问题。

Socket.io在安装时运行make,并且需要node-waf才能运行。 你是否通过一个包pipe理器来安装节点,比如ports,还是你在节点网站上使用dmg install?

这个线程谈到你遇到的问题:

https://github.com/LearnBoost/socket.io/issues/773

似乎如果你安装早期版本的socket.io ,则不需要运行make脚本。 我尝试了以下,并设法让我的Mac OSX 10.6.8成功安装:

 npm install socket.io@0.7 

有关这个谷歌组post的进一步讨论。