bower: Always get connection reset (ECONNRESET) error

Don’t matter what command I try, I always got this same error with bower:

$ bower search angular 
bower error tunneling socket could not be established, cause=read ECONNRESET

I didn’t found bower logs (perhaps I looked in the wrong place), so, I don’t have any idea about why am I getting this error.

I’m behind a proxy (cntlm), which is exported in my ENV. npm works as expected. Just bower don’t.

Info:

$ env | grep -i proxy
socks_proxy=socks://127.0.0.1:8010/
http_proxy=http://127.0.0.1:3128/
https_proxy=https://127.0.0.1:3128/
ftp_proxy=ftp://127.0.0.1:3128/

$ bower -v
0.9.2

$ npm -v
1.2.18

$ node -v
v0.10.5

OS is an Ubuntu Linux.

If I could give any more info, please ask. I’ll be glad to help.

Cheers.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 28 (4 by maintainers)

Most upvoted comments

Incase anybody is still having issues (despite the above), try adding:-

"registry": "http://bower.herokuapp.com"

e.g.:-

{
    "directory": "library",
    "registry": "http://bower.herokuapp.com",
    "proxy" : "http://user:pass@host:8080",
    "https-proxy" : "http://user:pass@host:8080",
    "strict-ssl": false
}

Sorted my issues.

If it’s any help, I’m facing the same problem in the same conditions (cntlm to bypass corporate proxy). I used bower-canary as @satazor suggested. Didn’t work until I had the following in my .bowerrc

{
    "proxy" : "http://localhost:3131",
    "https-proxy" : "http://localhost:3131",
    "strict-ssl": false
}

Knowing that 3131 is my proxy port. Don’t forget to execute git config --global url."https://".insteadOf git:// when behind a corporate proxy which blocks git protocol if needed

The proxy, https-proxy and strict-ssl settings in .bowerrc worked fine for our linux machines, but we are seeing the ECONNRESET issues in Windows (specifically Windows 7), no matter what. If "registry": "http://bower.herokuapp.com" is used, I get an Invalid protocol error.

EDIT: I was able to get it to work in Windows by removing the proxy and https-proxy options, and adding HTTP_PROXY and HTTPS_PROXY environment variables. This was the only way it seemed to work properly.

@marcuswhit Try adding your username and userpassword to these lines in .bowerrc . It worked for me!

{
    "proxy" : "http://<username>:<userpassword>@<proxyipaddress>:<port>",
    "https-proxy" : "http://<username>:<userpassword>@<proxyipaddress>:<port>",
    "strict-ssl": false
}