gpt4 book ai didi

angularjs - Bower 调用被公司代理阻止,然后在更新 .bowerrc 时出现错误

转载 作者:搜寻专家 更新时间:2023-10-31 22:21:51 26 4
gpt4 key购买 nike

我正在尝试通过 npm 安装 Bower 以设置 Angular 种子项目,但遇到了由我的公司代理引起的错误。

retry Request to https://bower.herokuapp.com/packages/angular failed with ECONNRESET, retrying in 1.2s
bower retry Request to https://bower.herokuapp.com/packages/angular-route failed with ECONNRESET, retrying in 1.4s
bower retry Request to https://bower.herokuapp.com/packages/angular-loader failed with ECONNRESET, retrying in 1.9s
bower retry Request to https://bower.herokuapp.com/packages/angular-mocks failed with ECONNRESET, retrying in 1.3s
bower retry Request to https://bower.herokuapp.com/packages/html5-boilerplate failed with ECONNRESET, retrying in 1.8s
bower retry Request to https://bower.herokuapp.com/packages/angular failed with ECONNRESET, retrying in 2.7s

我已尝试遵循我在另一个 stack overflow post 中看到的建议编辑我的 .bowerrc 文件以添加有关代理的详细信息。但是,一旦我这样做了,我就会收到这个错误:

/Users/t821714/Projects/customer/customer/node_modules/bower/node_modules/bower-config/lib/util/rc.js:56
throw error;
^
Error: Unable to parse /Users/t821714/Projects/customer/customer/.bowerrc: Unexpected token p

更新后的 .bowerrc 如下所示:

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

任何人都可以建议我的 .bowerrc 更新出了什么问题吗?或者提出解决问题的更好方法?

最佳答案

尝试添加我在 this old github thread 上找到的以下属性

{
"directory": "app/bower_components",
"registry": "http://bower.herokuapp.com",
"proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/",
"https-proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/",
"strict-ssl": false
}

关于angularjs - Bower 调用被公司代理阻止,然后在更新 .bowerrc 时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29838928/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com