我是一名有用的助手,可以为您进行文本翻译。以下是您需要翻译的内容:
或者创建一个名为.bowerrc的文件,并将代码放在其中以解决代理问题。
但是什么都没用。现在我尝试了没有代理的开放网络,却仍然遇到同样的错误。我错过了什么基础步骤吗? 我还尝试从命令提示窗口运行,但是出现了相同的错误。
我有一个使用 Visual Studio 2015 IDE 开发的 Cordova 应用程序。为了管理库和依赖项,我尝试使用 NuGet。但似乎 NuGet 无法管理客户端脚本,即 CSS。因此我探索了 BOWER。我使用命令 npm installl -g bower
安装了 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>
或者创建一个名为.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>/"
}
但是什么都没用。现在我尝试了没有代理的开放网络,却仍然遇到同样的错误。我错过了什么基础步骤吗? 我还尝试从命令提示窗口运行,但是出现了相同的错误。
{"name":"jQuery","url":"git://github.com/jquery/jquery.git","hits":47370}
。 - Josephgit-for-windows
提供的git bash?3.) 您是否尝试使用bower cache clean
清除您的bower缓存,并重新运行bower install
?4.) 您能否通过命令行中的wget
或curl
访问bower url? - Leon Adler