question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install error - getaddrinfo EAI_AGAIN registry.npmjs.org:443

See original GitHub issue

Everytime I try to npm install a file I get the following error: getaddrinfo EAI_AGAIN registry.npmjs.org:443

I am using stefanscherer/node-windows:8.9.3 image but have had this issue with many other images as well.

Initial npm error: npm-error

npm logs: npm-error-2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (3 by maintainers)

github_iconTop GitHub Comments

79reactions
binarymistcommented, Apr 18, 2018

This known issue for Docker and is discussed in detail here: https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/

Simple fix is to create the file /etc/docker/daemon.json

and insert:

{
    "dns": ["10.0.0.2", "8.8.8.8"]
}

where 10.0.0.2 is the first DNS server your machine requests records from, and 8.8.8.8 is the fallback DNS server, google in this case.

69reactions
edvegascommented, Feb 26, 2020

I couldn’t resolve issue with adding DNS setting to docker daemon, but I found another solution (maybe this will be useful for someone) - just use host network to resolve dns names by adding --network host setting, ex.: docker build . --network host -t mytag ...

Read more comments on GitHub >

github_iconTop Results From Across the Web

getaddrinfo EAI_AGAIN registry.npmjs.org error while npm ...
npm install not working when trying to install typescript or angular-cli. PFB some error logs from npm-debug file.
Read more >
getaddrinfo EAI_AGAIN registry.npmjs.org:80 - Stack Overflow
This error resemble some issue with network. I was trying to install a lib from NPM on windows but getting this error. This...
Read more >
Gitlab-runner: npm ci getaddrinfo EAI_AGAIN registry.npmjs.org
I try to use a gitlab CI pipeline with my angular project in Docker. But gitlab-runner fais with an error messagen when performing...
Read more >
fail to add nodes to node-red - 237458
Every node I tried to install so far returned an error: ... failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443
Read more >
npm install npm@latest - Robert Askam
Using WSL when running npm install npm@latest -g I kept receiving an error: npm ERR! request to http://registry.npmjs.org/npm failed, reason: getaddrinfo ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found