I have a Cordova application that is being developed using the Visual Studio 2015 IDE. To manage libraries and dependencies, I tried using NuGet. But it seems that NuGet cannot manage client-side scripting, i.e. CSS. So I researched BOWER. I installed bower using the npm installl -g bower , and now I can access all the Bower commands.
When I try to add dependencies such as jQuery and jQuery Mobile, it tries to select, and it failed. The error he 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 WellnessAdvisor@1.0.0 No description npm WARN package.json WellnessAdvisor@1.0.0 No repository field. npm WARN package.json WellnessAdvisor@1.0.0 No README data ====npm command completed with exit code 0====
I looked and said that I need to install a proxy, for example,
http_proxy = http://<user>:<password>@<your company proxy>:<port> https_proxy= http://<user>:<password>@<your company proxy>:<port>
or create a file called .bowerrc and put the code to overcome the 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 happened. Now I tried with an open network without a proxy, I get the same error. Did I skip any basic step?
I also tried from a command prompt window. Received the same error.