Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm ERR! network getaddrinfo ENOTFOUND

Tags:

node.js

npm

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 

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

like image 710
SharpCoder Avatar asked Apr 21 '14 08:04

SharpCoder


People also ask

What does Getaddrinfo Enotfound mean?

getaddrinfo ENOTFOUND means client was not able to connect to given address.

How do I find npm registry URL?

You can show the registry of a specific package with the npm view command. When you use npm config get registry you will see the default registry.


1 Answers

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.

like image 122
fibonacci Avatar answered Sep 25 '22 16:09

fibonacci