npm install error: tunneling socket could not be established

techbrood 发表于 2019-05-13 18:07:22

标签: npm, error, faq

- +

出现这个问题是因为代理设置不对,执行如下命令:

>npm config set proxy http://proxyhost:proxyport
>npm config set https-proxy http://proxyhost:proxyport

其中proxyhost可以是localhost,即本地代理,proxyport是端口号。

如果没有proxy,则需要去除:

>npm config set proxy null
>npm config set https-proxy null


possitive(15) views4217 comments0

发送私信

最新评论

请先 登录 再评论.
相关文章