Its*_*dan 77
编辑.bowerrc文件(应该在您的bower.json文件旁边)并添加所需的代理配置
"proxy":"http://<host>:<port>",
"https-proxy":"http://<host>:<port>"
Run Code Online (Sandbox Code Playgroud)
loi*_*ieu 51
有关信息,.bowerrc您可以在文件中添加无代理属性.我不知道从什么时候开始支持它,但它适用于凉亭1.7.4
.bowerrc:
{
"directory": "bower_components",
"proxy": "http://yourProxy:yourPort",
"https-proxy":"http://yourProxy:yourPort",
"no-proxy":"myserver.mydomain.com"
}
Run Code Online (Sandbox Code Playgroud)
.bowerrc应位于Javascript项目的根文件夹中,即启动bower命令的文件夹.您也可以将它放在您的主文件夹(~/.bowerrc)中.
小智 27
我有ETIMEDOUT错误,并在推出后
{
"proxy":"http://<user>:<password>@<host>:<port>",
"https-proxy":"http://<user>:<password>@<host>:<port>"
}
Run Code Online (Sandbox Code Playgroud)
刚刚工作.我不知道你的.bowerrc或ECONNRESET是否有问题无法用这个解决,但我希望这对你有帮助;)
小智 8
对我来说关键是添加一行额外的行"strict-ssl":false
在根文件夹上创建.bowerrc,并添加以下内容,
{
"directory": "bower_components", // If you change this, your folder named will change within dependecies. EX) Vendors instead of bower_components.
"proxy": "http://yourProxy:yourPort",
"https-proxy":"http://yourProxy:yourPort",
"strict-ssl": false
}
Run Code Online (Sandbox Code Playgroud)
对于仍然坚持这一点的人们来说,祝你好运.