Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to Install Bower Packages

I have a Cordova Application which is developed using Visual Studio 2015 IDE. To manage libraries and dependencies, I tried using NuGet. But it looks like, NuGet cannot manage client side scripts ie CSS. So I explored BOWER. I installed bower using the command npm installl -g bower and now I can access all Bower commands.

When I try to add dependencies like jQuery and jQuery Mobile, It try fetching and it failed. The error it gives is,

PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd" install --force-latest
bower                            retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 1.5s
bower                            retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 1.4s
bower                            retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 3.0s
bower                            retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 3.1s
bower                            retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 4.8s
bower                            retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 7.0s
bower                            retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 9.7s
bower                            retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 8.5s
bower                            retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 26.5s
bower                            retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 25.6s
bower jQuery#*              ECONNRESET Request to https://bower.herokuapp.com/packages/jQuery failed: tunneling socket could not be established, cause=connect ETIMEDOUT
====Executing command 'npm install'====


npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data

====npm command completed with exit code 0====

I browsed and it is said that I have to set proxy like,

http_proxy = http://<user>:<password>@<your company proxy>:<port>
https_proxy= http://<user>:<password>@<your company proxy>:<port>

or create a file named .bowerrc and place the code to overcome proxy.

{
  "directory": "library",
  "registry": "http://bower.herokuapp.com",
  "proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/",
  "https-proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/"
}

But nothing worked. Now I tried with open network with No proxy, I am getting the same error. Am I missing any basic step ?

I also tried from command prompt window. Got same error.

like image 580
Joseph Avatar asked Oct 19 '22 17:10

Joseph


2 Answers

Thanks for your support. I actually found the reason. Even though, I am not under my corporate proxy, there got set a property in Environment variables. That implies proxy even-though I am under a open network. No idea which software made the entry in Environment variables. I removed that and it works now.

like image 140
Joseph Avatar answered Oct 21 '22 09:10

Joseph


Have you already tried to change the git protocol from https to git by executing:

git config --global url."git://".insteadOf https://
like image 24
haihui Avatar answered Oct 21 '22 09:10

haihui