I tried to npm install jquery
and it failed when trying to install one of it's dependencies, Contextify. So I tried to npm install contextify
and got this error. I haven't been able to find a solution after about an hour or so of looking online. I keep getting close but not close enough. My node.js is running on Ubuntu 12.04, and as you can see in my code, node.js is version 0.8.11. Here is the error when trying to npm install jquery
:
gyp http GET http://nodejs.org/dist/v0.8.11/node-v0.8.11.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: socket hang up
gyp ERR! stack at createHangUpError (http.js:1263:15)
gyp ERR! stack at Socket.socketOnEnd (http.js:1351:23)
gyp ERR! stack at TCP.onread (net.js:418:26)
gyp ERR! System Linux 3.2.0-23-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/www/novacruisers/node_modules/jquery/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.8.11
gyp ERR! node-gyp -v v0.6.11
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
And the error for npm install contextify
:
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
Any help is greatly appreciated. :)
UPDATE
I've read that problems come if python is not installed or if a gcc compiler is not installed. I have both of those installed. I followed these instructions for the gcc compiler, and python 2.7 comes with Ubuntu 12.04. So I'm still researching. :)
Have you tried npm install --verbose contextify 2>&1 | grep gyp
? It should give you verbose output on the failure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With