npm fails to build socket.io with Error "Not compatible with your version of node/npm: [email protected]"
Problem
I cloned socket.io from https://github.com/LearnBoost/socket.io.git bit it fails with the following Message
npm http GET https://registry.npmjs.org/socket.io-client/0.9.2
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.2
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/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
> [email protected] preinstall /usr/src/socket.io/node_modules/socket.io-client/node_modules/ws
> make
npm http GET https://registry.npmjs.org/zeparser/0.0.5
node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.105s)
Waf: Entering directory `/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/build'
[1/4] cxx: src/validation.cc -> build/Release/src/validation_1.o
[2/4] cxx: src/bufferutil.cc -> build/Release/src/bufferutil_2.o
[3/4] cxx_link: build/Release/src/validation_1.o -> build/Release/validation.node
[4/4] cxx_link: build/Release/src/bufferutil_2.o -> build/Release/bufferutil.node
Waf: Leaving directory `/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/build'
'build' finished successfully (1.634s)
npm http GET https://registry.npmjs.org/commander/0.5.0
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander/0.5.0
npm ERR! error rolling back [email protected] Error: ENOTEMPTY, rmdir '/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws'
npm ERR! error rolling back [email protected] Error: ENOTEMPTY, rmdir '/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test'
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: [email protected]
npm ERR! Required: {"node":">= 0.4.x
My current version of node and npm is as follows
root@abhibhat-VirtualBox:/usr/src/socket.io# node -v
v0.7.7-pre
root@abhibhat-VirtualBox:/usr/src/socket.io# npm -v
1.1.10
root@abhibhat-VirtualBox:/usr/src/socket.io#
root@abhibhat-VirtualBox:/usr/src/socket.io# uname -a
Linux abhibhat-VirtualBox 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011 i686 i686 i386 GNU/Linux
root@abhibhat-VirtualBox:/usr/src/socket.io#
Is it that my node version is higher than the supported upper limit? If so what is the solution?
I am clueless as to how to proceed from here. Please !!HELP!!
Solution
npm -f install socket.io
just solved the issue. I also checked package.json
and there seems to be no upper limit "engines": { "node": ">= 0.4.0" }. Strangely I also had to issue npm -g list prior to issuing npm -f install, but how it solved the problem I am clueless.
Discussion
View additional discussion.