My npm is getting stuck a lot, whether its npm install from package.json or individual packages.
Right now, I\'m not even able to sudo npm install
I got the same issue. First of all try to run npm install with -verbose flag. That can help you identify your problem.
That command told me that I had some problem with tunneling socket:
tunneling socket could not be established, cause=write EPROTO 101057795:error:140770FC:SSL routines:SSL 23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
After that I googled the error and found thread on github about that problem. The problem was in proxy: previously I set up HTTP_PROXY environment variable and after removing then environment variable npm install completed without any error.