Yarn let us down today : "There appears to be trouble with your network connection. Retrying..."

Frontend.LA

May, 03

Fetching packages ...
There appears to be trouble with your network connection. Retrying...
There appears to be trouble with your network connection. Retrying...
There appears to be trouble with your network connection. Retrying...
There appears to be trouble with your network connection. Retrying...
An unexpected error occurred: "https://registry.yarnpkg.com/some-package-name:ESOCKETTIMEDOUT".

An engineer could not run yarn this morning, asked another engineer if yarn was working for her, but it kept failing. we thought it's our corporate network that is down but it couldn't have been because everything else seemed to be working. so we logged on to a Windows VM on GCP. Since we are a Google Partner we have access to tons of VMs but yarn was failing there too. All our CI/CD pipelines that use yarn weren't working either. We thought of all Dockerfiles that use yarn for our clients. The question is will it fix with time? or should we all go back to using npm install. What seems to have worked for us was increasing the yarn timeout

yarn install --network-timeout 1000000

also make sure there is no proxy

npm config rm proxy
npm config rm https-proxy

Did that work for you?