npm ETIMEDOUT 📦 npm

npm ERR! code ETIMEDOUT — network request to https://registry.npmjs.org/x failed, reason: connect ETIMEDOUT

npm couldn’t reach the registry in time — network, proxy or firewall issue.

Seen on: npm

Meaning

Proxies not configured, IPv6 routing problems, VPNs or a slow mirror. npm retries a few times before failing.

Common causes

  • Proxy required but not configured
  • Firewall blocking registry
  • IPv6 connectivity issues
  • Flaky network

⚡ Quick fix

  1. Configure proxy: npm config set proxy/https-proxy
  2. Increase fetch timeouts/retries
  3. Try another network or registry mirror

Detailed fix by platform

npm

  1. npm config set fetch-retries 5 && npm config set fetch-retry-maxtimeout 120000

How to diagnose

  1. Network — Can curl reach the registry?
  2. Proxy — Needed?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.