npm ERR!网络getaddrinfo ENOTFOUND [英] npm ERR! network getaddrinfo ENOTFOUND

查看:1515
本文介绍了npm ERR!网络getaddrinfo ENOTFOUND的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用NPM安装任何软件包时出现npm ERR! network getaddrinfo ENOTFOUND错误.我知道在同一问题上有很多线程,但是我找不到任何可以帮助我的线程.

I am getting npm ERR! network getaddrinfo ENOTFOUND error while trying to install any package using NPM. I know there are numerous threads on the same issue but I could not find any thread which can help me.

我已设置代理&我认为这与代理设置不正确\未使用正确的网址有关.

I have set the proxy & I think its something to do with proxy not being set correctly\not using the correct url.

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

设置代理正确时,是否有任何方法可以检查我使用的URL?我需要采取任何步骤来纠正此问题吗?

Is there any way to check the URL I am using while setting proxy is correct? Are there any steps I need to take in order rectify this issue?

推荐答案

我将代理设置为

npm config set http_proxy=http://domain:8080

代替正确的方法

npm config set proxy http://domain:8080

这篇关于npm ERR!网络getaddrinfo ENOTFOUND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆