NPM doesn't install any modules: network socket hangs up
Solution 1:
i had same problem. it seems that there is some problem with ISP's https handling. doing:
npm config set registry http://registry.npmjs.org/
worked for me
Solution 2:
I was having the same problem. Found a solution in this thread.
You can see the effective proxy that npm
is using by doing:
npm config get proxy
npm config get https-proxy
If you're behinid a proxy, try this:
mv ~/.npmrc ~/.npmrc.bak
Solution 3:
I was having a similar issue with my windows machine and i fixed it by first checking whether my proxy got some value by executing the below command.
npm config get proxy
in return i got the below:
http://usr:pwd@host/:port
So if anyone who is not under a proxy layer first set the proxy as null by executing the below command.
npm config set proxy null
now if you excecute your npm i it should not throw any network error.