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

前端之家收集整理的这篇文章主要介绍了angularjs – Bower调用被公司代理阻止,然后在更新.bowerrc时出错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试通过npm安装bower来设置角度种子项目但是遇到了由我的公司代理引起的错误.
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","strict-ssl": false
}

猜你在找的Angularjs相关文章