# npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

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

npm can’t verify the registry’s certificate chain — missing intermediate or intercepted connection.

## Meaning

Same family as the self-signed chain error: corporate proxies, outdated Node CA bundles, or private registries with incomplete chains.

## Common causes

- Corporate proxy CA not trusted
- Very old Node/npm
- Private registry missing intermediates

## Quick fix

1. Configure cafile with the company/registry CA
2. Update Node/npm
3. Fix the registry’s certificate chain

## Detailed fix by platform

### npm

1. `npm config set cafile ./certs/registry-chain.pem`

## How to diagnose

1. **Chain** — openssl s_client against the registry
2. **Recent change** — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/npm/unable-to-get-issuer-cert-locally)
