Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Bower Package behind a proxy

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?

like image 385
Fabbio Avatar asked Dec 20 '22 14:12

Fabbio


1 Answers

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.

like image 194
MichelMattos Avatar answered Dec 28 '22 06:12

MichelMattos