Bower error tunneling socket could not be establis

2019-02-13 02:46发布

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 ?

4条回答
倾城 Initia
2楼-- · 2019-02-13 02:53

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/
查看更多
别忘想泡老子
3楼-- · 2019-02-13 03:00

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

查看更多
手持菜刀,她持情操
4楼-- · 2019-02-13 03:03

Following command work for me

npm config set proxy "http://domain\username:password@servername:port/"
查看更多
再贱就再见
5楼-- · 2019-02-13 03:17

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. :)

查看更多
登录 后发表回答