2

I am running visual studio 2015 behind a proxy, for that reason bower is failing to install packages. As mentioned here , I have put the proxy settings in .bowerrc file and placed this file on the root of the project, but still package restore is timing out.

I have tried similar situation with webstorm projects and it worked. Also, noticed that npm package pick up the IE proxy, so no need of extra configuration.

In short:

  1. How can we set the proxy configuration for bower in visual studio project?
  2. Is there a way to set the proxy configuration globally for bower?
Community
  • 1
  • 1
Nexus23
  • 6,195
  • 9
  • 50
  • 67

3 Answers3

1

I had the same problem and solved it by adding .bowerrc file on the project root directory next to bower.json file, so it looks like Bower can be configured just as you described. I'm using Visual Studio 2015 CTP 6.

I also had to add the same proxy settings to Git, e.g:

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
git config --global https.proxy https://proxyuser:proxypwd@proxy.server.com:8080
apehkone
  • 31
  • 1
  • where is the git.exe do do this? When I just start a command line (or even a VS command line) git isn't a known command. When I run the version at: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git" it says unsupported command argument. – Bryan Jul 27 '15 at 19:29
  • I think you can't do that with git.exe You must install git on your machine (first install node.js then install npm and finally install git). Yeah it sucks. You wan't probably not install all of this. But after that, this command will works and set the proxy settings for you. – rdhainaut Jun 10 '16 at 06:40
  • A solution exists without any extra installation. For more details, check this answer [link](http://stackoverflow.com/a/34182143/1152632). – rdhainaut Jun 10 '16 at 06:43
0

For me, bower was not able to download the package and gave me a ECMDERR error.

I ran the bower command related to downloading the package from the visual studio web tools folder and the error message has to do something with Git.

So I’ve decided to install Git from my visual studio installation and this fixed the issue.

dfdsfdsfsdf
  • 653
  • 3
  • 7
0

On the root folder locate .bowerrc file next to bower.json file and add these two properties:

 {
   ...
    "proxy": "http://proxyuser:proxypwd@proxy.server.com:8080",
    "https-proxy": "http://proxyuser:proxypwd@proxy.server.com:8080"
 }

put your proxy in those two properties.