Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs Bower呼叫被公司代理阻止,然后我在更新.bowerrc时出错_Angularjs_Node.js_Ssl_Proxy_Bower - Fatal编程技术网

Angularjs Bower呼叫被公司代理阻止,然后我在更新.bowerrc时出错

Angularjs Bower呼叫被公司代理阻止,然后我在更新.bowerrc时出错,angularjs,node.js,ssl,proxy,bower,Angularjs,Node.js,Ssl,Proxy,Bower,我正试图通过npm安装bower来设置angular seed项目,但遇到了由我的公司代理引起的错误 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-r

我正试图通过npm安装bower来设置angular seed项目,但遇到了由我的公司代理引起的错误

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
我试着按照我在另一本书中看到的建议来编辑我的.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>/",
}
{
“目录”:“应用程序/鲍尔_组件”,
“注册表”:http://bower.herokuapp.com",
“代理”:“http:/:@:/”,
“https代理”:“http:/:@:/”,
}

有人能建议我的.bowerrc更新出了什么问题吗?或者建议更好的方法来解决此问题?

尝试添加我在上找到的以下属性

{
“目录”:“应用程序/鲍尔_组件”,
“注册表”:http://bower.herokuapp.com",
“代理”:“http:/:@:/”,
“https代理”:“http:/:@:/”,
“严格ssl”:false
}

“strict ssl”:false你救了我一命,真是太棒了:)万一它对其他人有帮助,我想说的是,尽管这对我有用。。。我意外地发现,我的公司网络在本地使用一个代理,在通过VPN远程工作时使用一个完全独立的代理。现在,我根据连接方式交换代理配置。
{
    "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
}