npm install socket.io on gentoo
> npm install socket.io
npm 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.0
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/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.0
npm http 304 https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws/0.4.0
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/ws/0.4.0
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
> ws@0.4.0 preinstall /home/shoan/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> make
node-waf configure build
Traceback (most recent call last):
File "/usr/bin/node-waf", line 14, in
import Scripting
File "/usr/bin/../lib/node/wafadmin/Scripting.py", line 146
except Utils.WafError, e:
^
SyntaxError: invalid syntax
make: *** [all] Error 1
npm ERR! error installing ws@0.4.0
npm ERR! error installing socket.io-client@0.9.0
npm ERR! error installing socket.io@0.9.0
npm ERR! ws@0.4.0 preinstall: `make`
npm ERR! `sh "-c" "make"` failed with 2
npm ERR!
npm ERR! Failed at the ws@0.4.0 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 Linux 3.2.6-gentoo
npm ERR! command "node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /home/shoan
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message ws@0.4.0 preinstall: `make`
npm ERR! message `sh "-c" "make"` failed with 2
npm ERR! errno {}
npm ERR! Error: ENOENT, no such file or directory '/home/shoan/node_modules/socket.io/node_modules/socket.io-client/node_modules/___uglify-js.npm/package/tmp/app.js'
npm ERR! You may report this log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 3.2.6-gentoo
npm ERR! command "node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /home/shoan
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /home/shoan/node_modules/socket.io/node_modules/socket.io-client/node_modules/___uglify-js.npm/package/tmp/app.js
npm ERR! fstream_path /home/shoan/node_modules/socket.io/node_modules/socket.io-client/node_modules/___uglify-js.npm/package/tmp/app.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/home/shoan/node_modules/socket.io/node_modules/socket.io-client/node_modules/___uglify-js.npm/package/tmp/app.js'
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (/usr/lib64/node_modules/npm/node_modules/fstream/lib/writer.js:204:26)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/shoan/npm-debug.log
npm not ok
The solution is just to set Python 2.7
> eselect python list Available Python interpreters: [1] python2.7 [2] python3.2 * > sudo eselect python set 1