npm 错误!网络获取地址信息 ENOTFOUND [英] npm ERR! network getaddrinfo ENOTFOUND

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

问题描述

我收到 npm ERR!尝试使用 NPM 安装任何软件包时,网络 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.

我已经设置了代理 &我认为这与没有正确设置代理有关未使用正确的 url.

I have set the proxy & I think its something to do with proxy not being set correctly ot 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 错误!网络获取地址信息 ENOTFOUND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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