Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 ot using the correct url.

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

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?

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
924 views
Welcome To Ask or Share your Answers For Others

1 Answer

Maybe it's because the proxy do not stand for https. What I do is clear the proxy content of ~/.npmrc, or use

    npm config delete proxy

What's more, nrm is recommended for this problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...