Videl Videl - 4 months ago 44
Node.js Question

NPM does not install anything : it hangs

Whenever I want to install a module with NVM, it hangs at that stage:

npm install express
npm http GET https://registry.npmjs.org/express


And that's it. It has that behavior for anything I input instead of express. I installed nodejs and nvm that way (Ubuntu 13.10):

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs


I tried looking on internet and GitHub and I found a closed issue about nvm hanging forever when trying to install a module.. but it was a really old issue. Before I ask the developers, am I missing something obvious ?

I tried compiling both nodejs and nvm but the result was the same.

EDIT:
npm install express -verbose
-> http://pastebin.com/tGY3V6Ly
Error:

npm info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=140072708810560:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:

Answer

NPM has been having server issues of late. Try running the command with -verbose to check and see what is going on, and be patient.