Tochukwu Ogugua
Tochukwu Ogugua

Reputation: 117

how can I solve this error in ionic `You must specify a "protocol" for the proxy type`

I ran ionic start series sidetabs in my Windows and got this error

enter image description here

TypeError: You must specify a "protocol" for the proxy type (http, https, socks, socks4, socks4a, socks5, socks5h, pac+data, pac+file, pac+ftp, pac+http, pac+https)
    at new ProxyAgent (C:\Users\sato\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\proxy-agent\index.js:97:11)
    at ProxyAgent (C:\Users\sato\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\proxy-agent\index.js:81:45)
    at Request.proxy (C:\Users\sato\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\superagent-proxy\index.js:71:15)
    at C:\Users\sato\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\http.js:31:17
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\sato\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:102:62)
    at <anonymous>

How do I solve this?

Upvotes: 0

Views: 4348

Answers (2)

Dark Developer
Dark Developer

Reputation: 1

my problem was solved with the command npm config unset -g proxy

Upvotes: 0

clu3Less
clu3Less

Reputation: 1882

For Windows, enter the SET command without quotes. The plugin cannot identify the protocol from the url if the text contains quotes. Might get fixed in future. As of now, this worked for me,

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

This applies if your proxy is an HTTP proxy. If you have a SOCK proxy, you need to edit accordingly changing the url and proxy=sock

Upvotes: 5

Related Questions