Ionic framework 如何解决“您必须指定”中的此错误;协议“;对于代理类型`

Ionic framework 如何解决“您必须指定”中的此错误;协议“;对于代理类型`,ionic-framework,Ionic Framework,我在我的Windows中运行了ionic开始系列sidetabs,得到了这个错误 TypeError:必须为代理类型指定“协议”(http、https、socks、socks4、socks4a、socks5、socks5h、pac+数据、pac+文件、pac+ftp、pac+http、pac+https) 在新ProxyAgent上(C:\Users\sato\AppData\Roaming\npm\node\u modules\@ionic\cli plugin proxy\node\u m

我在我的
Windows
中运行了
ionic
开始系列
sidetabs
,得到了这个错误

TypeError:必须为代理类型指定“协议”(http、https、socks、socks4、socks4a、socks5、socks5h、pac+数据、pac+文件、pac+ftp、pac+http、pac+https)
在新ProxyAgent上(C:\Users\sato\AppData\Roaming\npm\node\u modules\@ionic\cli plugin proxy\node\u modules\proxy agent\index.js:97:11)
在ProxyAgent(C:\Users\sato\AppData\Roaming\npm\node\u modules\@ionic\cli plugin proxy\node\u modules\proxy agent\index.js:81:45)
at Request.proxy(C:\Users\sato\AppData\Roaming\npm\node\u modules\@ionic\cli plugin proxy\node\u modules\superagent proxy\index.js:71:15)
在C:\Users\sato\AppData\Roaming\npm\node\u modules\ionic\node\u modules\ionic\cli utils\lib\http.js:31:17
在Generator.next()处
完成时(C:\Users\sato\AppData\Roaming\npm\node\u modules\ionic\node\u modules\tslib\tslib.js:102:62)
在

如何解决此问题?

对于Windows,输入不带引号的
SET
命令。如果文本包含引号,插件无法从url识别协议。将来可能会修好。到目前为止,这对我来说很有效

set HTTP_PROXY=http://proxy.company.com:port-number
set HTTPS_PROXY=http://proxy.company.com:port-number
set IONIC_HTTP_PROXY=http://proxy.company.com:port-number
set PROXY=http

如果您的代理是HTTP代理,则此选项适用。如果您有一个SOCK代理,您需要相应地编辑更改url和
proxy=SOCK

对于Windows,输入不带引号的
SET
命令。如果文本包含引号,插件无法从url识别协议。将来可能会修好。到目前为止,这对我来说很有效

set HTTP_PROXY=http://proxy.company.com:port-number
set HTTPS_PROXY=http://proxy.company.com:port-number
set IONIC_HTTP_PROXY=http://proxy.company.com:port-number
set PROXY=http

如果您的代理是HTTP代理,则此选项适用。如果您有一个SOCK代理,您需要相应地编辑更改url和
proxy=SOCK

我的问题是用命令npm config unset-g proxy解决的我的问题是用命令npm config unset-g proxy解决的

试试“set proxy=http”这对我是有效的(我的机器运行在windows 10上)。谢谢!我也遇到了同样的问题,这个设置是rite吗?set-HTTP\U-PROXY=set-HTTPS\U-PROXY=set-IONIC\U-HTTP\U-PROXY=set-PROXY=HttpTtry“set-PROXY=HTTP”这对我来说很有效(我的机器运行在windows 10上)。谢谢!我也遇到了同样的问题,这个设置是rite吗?set-HTTP\u-PROXY=set-HTTPS\u-PROXY=set-IONIC\u-HTTP\u-PROXY=set-PROXY=HTTP