Bower error tunneling socket could not be establis

2019-02-13 03:05发布

问题:

I'm behind a corporate proxy, I've set my HTTP_PROXY and HTTPS_PROXY env var to

http://username:password@proxyname:port/

doing console.log(process.env) output these var correctly. npm is working, I got bower with it and it(bower) was working fine but since I restarted windows XP I'm always getting :

bower error tunneling socket could not be established, cause=Parse Error

I don't think there's anything new on the proxy side. I've already tried reseting those vars, restarting everything... Any sugestion ?

回答1:

If changing the proxy settings as pointed out by Vipul is not sufficient also change the registry:

npm config set registry http://registry.npmjs.org/


回答2:

I really don't know why but clearing an .npmrc file in my home fixed it.



回答3:

Following command work for me

npm config set proxy "http://domain\username:password@servername:port/"


回答4:

I was getting the same issue with corporate proxy ON.

The solution is you just need to set system environment variables 'http_proxy' & 'https_proxy' to http://username:password@proxyname:port/

No need to clear .npmrc file.

Its a clear proxy issue and not a node issue. :)