How to fix npm ERR! code ENOAUDIT npm ERR! Audit endpoint not supported in npm

npmINTERMEDIATEMEDIUMUpdated Dec 5, 2025ยท 199 views

ENOAUDIT occurs when npm audit cannot reach or is not supported by your configured registry. Use --registry flag to audit against the public npm registry or disable audit with --no-audit.

Quick fix

Fixes ENOAUDIT

npm audit --registry=https://registry.npmjs.org/
  1. Explicitly specify the public npm registry for audit commands
  2. Update npm and Node.js to the latest version
  3. Clean install by removing lock files and reinstalling
  4. Check and update your .npmrc configuration
npm โ€” error
npm audit --registry=https://registry.npmjs.org/
npm ERR! code ENOAUDIT
npm ERR! Audit endpoint not supported

What this error means

The ENOAUDIT error occurs when npm audit cannot reach or is not supported by your configured package registry. This typically happens when you're using a private, corporate, or alternative npm registry that doesn't implement the security audit API endpoint that npm expects. The error indicates that npm is trying to check your dependencies for known security vulnerabilities, but the registry you're pointing to either doesn't support this feature or the connection to the audit endpoint is failing. This is a configuration issue rather than a problem with your code or dependencies.

Typical symptoms

  • npm audit command fails with 'code ENOAUDIT' error message
  • npm install completes successfully but audit check fails
  • CI/CD pipelines fail at the npm audit step
  • Error message states 'Your configured registry does not support audit requests'
  • npm audit fix command returns the same ENOAUDIT error without making any changes

Common causes

  1. Using a private npm registry (Artifactory, Nexus, Verdaccio) that doesn't support the audit API endpoint
  2. Misconfigured .npmrc file pointing to a registry that lacks audit functionality
  3. Registry endpoint is temporarily unavailable or returning 503/timeout responses
  4. Using an older private registry version that predates audit API support
  5. Network connectivity issue preventing npm from reaching the audit endpoint
  6. Corrupted or invalid package-lock.json file causing audit lookup failures

How to fix "npm ERR! code ENOAUDIT npm ERR! Audit endpoint not supported"

1Explicitly specify the public npm registry for audit commands

Add the official npm registry URL to your audit command to bypass your configured private registry:

bash
npm audit --registry=https://registry.npmjs.org/

Or for audit fix:

bash
npm audit fix --registry=https://registry.npmjs.org/
2Update npm and Node.js to the latest version

Ensure you're running the latest versions of npm and Node.js:

bash
npm install -g npm@latest

Check your current version:

bash
npm --version
node --version
3Clean install by removing lock files and reinstalling

Delete your package-lock.json and node_modules folder and reinstall:

bash
rm package-lock.json
rm -rf node_modules
npm install

Then run audit again:

bash
npm audit
4Check and update your .npmrc configuration

Verify your .npmrc file to see which registry is configured:

bash
cat ~/.npmrc
cat .npmrc

If it points to a private registry without audit support, use a dual-registry setup in .npmrc:

bash
registry=https://registry.npmjs.org/
@mycompany:registry=https://my-private-registry.com/npm/
5Disable audit during install and run it separately

If npm audit runs automatically during npm install and fails, disable it temporarily:

bash
npm install --audit=false

Then manually run audit with the public registry:

bash
npm audit --registry=https://registry.npmjs.org/

You can also configure this in .npmrc:

bash
audit=false
6For private registries: upgrade or use an audit proxy

If you're managing a private registry and need audit support:

For Artifactory: Modern versions support npm audit natively.

For Nexus/Verdaccio: These open-source registries may not support audit. Consider:
- Upgrading to a version with audit support
- Using an npm-audit-proxy to redirect audit calls to the public npm registry
- Using third-party tools like Snyk or JFrog Xray for vulnerability scanning

Advanced notes

For enterprise environments using corporate proxies: ensure your HTTP proxy configuration supports the audit endpoint. The audit API requires HTTPS POST requests to /-/npm/v1/security/audits with JSON payloads. Some corporate proxies or firewalls may block this endpoint even if package installation works fine. The audit-ci tool offers --pass-enoaudit flag for CI/CD pipelines where audit endpoint support is unavailable, allowing builds to pass while still attempting audits.

Frequently asked questions

What does "ENOAUDIT" mean?
The ENOAUDIT error occurs when npm audit cannot reach or is not supported by your configured package registry. This typically happens when you're using a private, corporate, or alternative npm registry that doesn't implement the security audit API endpoint that npm expects. The error indicates that npm is trying to check your dependencies for known security vulnerabilities, but the registry you're pointing to either doesn't support this feature or the connection to the audit endpoint is failing.
How do I fix "ENOAUDIT"?
ENOAUDIT occurs when npm audit cannot reach or is not supported by your configured registry. Use --registry flag to audit against the public npm registry or disable audit with --no-audit.
What causes "ENOAUDIT"?
Using a private npm registry (Artifactory, Nexus, Verdaccio) that doesn't support the audit API endpoint Misconfigured .npmrc file pointing to a registry that lacks audit functionality Registry endpoint is temporarily unavailable or returning 503/timeout responses
Is the "ENOAUDIT" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading