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

放肆的年华 提交于 2019-12-18 22:32:41

问题


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



来源:https://stackoverflow.com/questions/17324438/bower-error-tunneling-socket-could-not-be-established-cause-parse-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!