Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm won't install packages "npm ERR! network tunneling socket could not be established, cause=Parse Error"

I am having trouble with npm and node version 0.10.40. I never had this problem before and I am not behind a proxy. I have tried other solutions that I found on Stack Overflow and other forums such as changing the registry url to http://.. rather than https://.., and setting strict-ssl to false. When I do this npm is unable to parse JSON. Here is my npm-debug.log. Maybe someone can help me figure out what is going on.

npm-debug.log

like image 563
cbanowsky Avatar asked Dec 01 '22 17:12

cbanowsky


2 Answers

I solved this issue by issuing the following commands

npm config set proxy false
npm cache clean

Apparently npm was attempting to bypass a proxy or believed it was behind a proxy. Strange.

like image 185
cbanowsky Avatar answered Dec 04 '22 03:12

cbanowsky


When you are behind the proxy in a corporate environment you would have used the following commands

npm config set proxy http://xxx.xxx.xxx.x:8080
npm config set https-proxy http://xxx.xxx.xxx.x:8080

When you are not just switch the proxy off by

npm config set proxy false
npm cache clean

like image 36
Ignatius Andrew Avatar answered Dec 04 '22 03:12

Ignatius Andrew