Hi folks, I ran out of my bandwidth and Internet speed reduces around 50KBps, yarn fails to install its components, while npm does work finally a little slower but it work.
Trace:
Error: getaddrinfo EAI_AGAIN registry.yarnpkg.com:443
at Object.exports._errnoException (util.js:1026:11)
at errnoException (dns.js:33:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
Let me know if any further input needed.
+1
@Jas99 Please don’t post👍 in the main post is enough.
+1
comment.I also experience the same issue, this is a screenshot of a recent occurrance:
It seems to be somewhat intermittent (almost 60%% probability of happening).
This is my docker file:
I experienced it too, but setting the network-concurrency parameter to 1 solved it in my case:
I had this same issue running yarn in a docker container on Ubuntu 17.04, and found that, in my case, running
dnsmasq
as a service (for an unrelated project) was causing the containerizedyarn install
to throw this error. Stoppingdnsmasq
solved the issue.I had this issue when doing a yarn install into the Docker base image alexsuch/angular-cli (1.2.1). I figured out that deleting local Docker image and restarting Docker solved the problem.
I suspect yarn keep failing because of the DNS record not found from the Docker image, for some reason (long Docker exec on my dev laptop can lead to little unwanted behaviours like these).
A quick & dirty fix is to add following line to your
/etc/hosts
file (*nix) orC:\Windows\System32\drivers\etc\
file (Windows):where
AAA.BB.CC.DDD
is the IP address currently mapped to theregistry.yarnpkg.com
domain. At the moment it’s104.16.63.173
but may change. You can get it from here for example: https://www.ultratools.com/tools/pingResult?hostName=registry.yarnpkg.comdocker-machine restart
solved it in my instance.This problem happen when you change your network, maybe from a wifi network to another one.
All you need to do is restart the docker service:
sudo systemctl restart docker
Same issue for me in docker. but outside the docker it works.
--network-concurrency 1
didn’t work for me, here’s the workaround inspired by @avsd: