ENOTFOUND 📦 npm

npm ERR! code ENOTFOUND — request to https://registry.npmjs.org/x failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org

npm couldn’t resolve the registry hostname.

Seen on: npm

Meaning

No internet, broken DNS, a wrong custom registry URL, or proxy settings needed.

Common causes

  • Offline/DNS failure
  • Typo in a custom registry URL
  • Proxy required

⚡ Quick fix

  1. Check npm config get registry
  2. Test DNS: nslookup registry.npmjs.org
  3. Configure the proxy

Detailed fix by platform

npm

  1. npm config get registry && npm config set registry https://registry.npmjs.org/

How to diagnose

  1. Registry — Correct URL?
  2. DNS — Resolves?

🧠 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.