Error AtlasError Documentation and Resolution

npm SSL certificate is untrusted or leaf signature cannot be verified

npm ERR! Error: SSL Error: CERT_UNTRUSTED / UNABLE_TO_VERIFY_LEAF_SIGNATURE

npm could not validate the TLS certificate chain for the registry connection, often because of outdated runtime support, custom CA issues, or an inspecting proxy.

CERT_UNTRUSTED / UNABLE_TO_VERIFY_LEAF_SIGNATUREnetworking
npm ERR! Error: SSL Error: CERT_UNTRUSTED / UNABLE_TO_VERIFY_LEAF_SIGNATURE
  • The runtime or npm client does not trust the presented certificate chain.
  • Custom CA or registry TLS settings are incomplete or incorrect.
  • A proxy is intercepting SSL traffic and presenting a certificate npm does not trust.
  1. Upgrade the runtime or npm client if certificate handling is outdated.
  2. Review npm CA configuration and align it with the certificate chain in use.
  3. Investigate whether a proxy is rewriting TLS connections.
npm Docs: Common errors
npm CERT_UNTRUSTED or UNABLE_TO_VERIFY_LEAF_SIGNATURE: causes and fixes | Error Atlas