Intenté con npm install jquery
y falló al intentar instalar una de sus dependencias, Contextify. Así que traté de npm install contextify
y obtuve este error. No he podido encontrar una solución después de aproximadamente una hora de buscar en línea. Sigo acercándome pero no lo suficientemente cerca. Mi node.js se ejecuta en Ubuntu 12.04, y como puede ver en mi código, node.js es la versión 0.8.11. Aquí está el error al intentar npm install jquery
:[email protected] install: `node-gyp Rebuild` falló con 1
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]
Y el error de npm install contextify
:
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
Cualquier ayuda es muy apreciada. :)
ACTUALIZACIÓN
He leído que los problemas vienen si pitón no está instalado o si un compilador gcc no está instalado. Tengo ambos instalados. Seguí these instructions for the gcc compiler, y Python 2.7 viene con Ubuntu 12.04. Así que todavía estoy investigando. :)
Puede que tenga el mismo problema que esto: http://stackoverflow.com/questions/9382868/unable-to-install-jquery-with-node-js-unable-to-load-contextify –