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

**Code:** `ENOTFOUND` · **Category:** npm · **Seen on:** npm

npm couldn’t resolve the registry hostname.

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/npm/enotfound-registry)
