Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 'tunneling socket' while executing npm install

Tags:

npm

protractor

I'm getting the error shown below while trying to execute 'npm install' command.

Error: tunneling socket could not be established, cause=connect ECONNREFUSED 10.232.207.137:8080

What do I miss?

screenshot

like image 632
Kannan Avatar asked Oct 16 '15 04:10

Kannan


2 Answers

If you are behind a proxy, set it correctly in npm.

>npm config set proxy http://proxyhost:proxyport
>npm config set https-proxy http://proxyhost:proxyport

Notes:

  1. For SSL/https proxies, the protocol in URL should be http not https

  2. If your set up is on a Docker/Vagrant instance or a hosted VM, use IP address instead of hostname for proxy as the later might not be resolvable.

  3. If there is no proxy , remove proxy config from npm

    >npm config set proxy null
    >npm config set https-proxy null
    
like image 98
Roshith Avatar answered Oct 18 '22 12:10

Roshith


I know this is way too late but if someone has a similar issue in the future and you are sure you have no proxy set but you have an environment variable called http_proxy. Please delete it and try again. I had set a proxy for Fiddler.

like image 33
IsaacK Avatar answered Oct 18 '22 12:10

IsaacK