4

I am struggling with the Bower's installation behind my company's network. Despite of setting npm proxy and bower proxy (in the .bowerrc file), as suggested in many other posts, I still get this error:

bower ECONNREFUSED Request to https://bower.herokuapp.com/packages/bootstrap-sass-official failed: connect ECONNREFUSED

On the other hand node, npm and grunt seem to work well. Can anybody help with some other idea about how to tackle the problem?

hong4rc
  • 3,999
  • 4
  • 21
  • 40
Fabbio
  • 343
  • 2
  • 16
  • Here is the answer : http://stackoverflow.com/questions/21750804/bower-calls-blocked-by-corporate-proxy This worked for me – Ahmed Kaouri Jun 20 '14 at 08:46

4 Answers4

9

Try to create a file named ".bowerrc" inside your user profile (usually at "C:/Users/[YOUR USERNAME]" or "%USERPROFILE%" shortcut). Try to put this inside your file and save:

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

If that doesn't work, try to put this:

{
  "registry": "http://bower.herokuapp.com",
  "proxy": "http://<user>:<pwd>@proxy.host.br:8080",
  "https-proxy": "http://<user>:<pwd>@proxy.host.br:8080",
  "strict-ssl": false
}

PS.: You will need to know your company's proxy address.

MichelMattos
  • 176
  • 1
  • 5
  • Similar to https://stackoverflow.com/a/23288312/1175496 , as Ahmed Kouri points out in a comment on the original question. – Nate Anderson Jun 20 '17 at 14:56
1

Have you tried:

http_proxy='proxyserver' https_proxy='proxyserver' bower install

?

Mangled Deutz
  • 11,384
  • 6
  • 39
  • 35
1
{
  "directory": "library",
  "registry": "http://bower.herokuapp.com",
  "proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/",
  "https-proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/"
}

This code worked for me. I am using Win 7 and chrome and also git bash. Here few things need to be cleared. This takes me huge time to find the actual data regarding the user name, password, proxy IP and Port. I will describe it step by step so that every learners can easily grasp the message:

Create a file in the notepad named .bowerrc in the login folder; You can go there by typing at Start>Run>%UserProfile% and press OK. Type above code in the .bowerrc file with the following changes:

Replace <USERNAME> with your internet connection user ID or login ID

Replace <PASSWORD> with your internet connection password or login password.

Replace <PROXY_IP> and <PROXY_PORT> with the working proxy IP address and its port number.

Note: There should be no angle brackets. Proxy IP should be different than your own IP.

Before using any proxy IP and port you should check it is working by changing your proxy IP and port.

You can go through this link to know the details of proxy settings at description here

From this proxy settings you will get Proxy IP and Port. Recheck all the input so that all are correct and save and close the file. Open git bash and change directory to the project file and type command and hit enter, in my case, git bash command:

a@a-PC MINGW32 /d/conFusion

$ bower install

It worked like magic.

ohid
  • 824
  • 2
  • 8
  • 23
0

In my case, my .bowerrc file was using a proxy (so .bowerrc had both proxy and https-proxy properties set, without any username or password).

Those were causing me the ECONNREFUSED.

https://github.com/jquery/jquery.git", exit code of #128 fatal: unable to access 'https://github.com/jquery/jquery.git/': 
  Failed to connect to webproxy.wlb2.nam.nsroot.net port 8080: Connection refused

Additional error details:
fatal: unable to access 'https://github.com/jquery/jquery.git/': 
  Failed to connect to webproxy.wlb2.nam.nsroot.net port 8080: Connection refused

I removed them, (my current internet connection is not behind a proxy), and so errors stopped.

Nate Anderson
  • 18,334
  • 18
  • 100
  • 135