Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

protractor - Error 'tunneling socket' while executing npm install

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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
    

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...