Skip to content
MtrXTools

npm ERR! code ERR_SOCKET_TIMEOUT

The registry connection went silent

Seen in npm install (npm 7 and later), CI pipelines, Docker builds

npm opened a connection to the registry but stopped receiving data for longer than its timeout.

Common causes

  • A slow or lossy network, VPN or proxy stalls downloads.
  • A proxy or private registry is overloaded or not responding.
  • Too many parallel downloads on a constrained CI or container network.

How to fix it

  1. Check proxy settings (npm config get proxy and https-proxy) and remove stale ones.
  2. Retry on a better connection, or raise the timeout: npm config set fetch-timeout 600000.
  3. Point npm at a closer or healthier registry mirror if you use one.

Got a different message? Paste it into the error explainer.

Related errors

All 31 Dev tools & SSH errors