无法安装Bower软件包

我有一个使用Visual Studio 2015 IDE开发的Cordova应用程序。 为了pipe理库和依赖,我尝试使用NuGet。 但看起来,NuGet无法pipe理客户端脚本,即CSS。 所以我探索了BOWER。 我使用命令npm installl -g bower安装了npm installl -g bower ,现在我可以访问所有Bower命令。

当我尝试添加jQuery和jQuery Mobile之类的依赖项时,它会尝试提取并失败。 它给出的错误是,

 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==== 

我浏览过,据说我必须设置代理,

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

或者创build一个名为.bowerrc的文件,然后放置代码来克服代理。

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

但没有任何工作。 现在我尝试用无代理开放networking,我得到同样的错误。 我是否缺less基本步骤?

我也尝试从命令提示窗口。 有同样的错误。

感谢您的支持。 我其实find了原因。 即使我不在我的公司代理下,在环境variables中设置了一个属性。 这意味着代理即使我是在一个开放的networking。 不知道哪个软件在环境variables中作了input。 我删除了,现在它的作品。

您是否已经尝试通过执行以下命令将git协议从https更改为git:

 git config --global url."git://".insteadOf https://