npm / npm/cli

[BUG] npm audit fails with 404 error

Open
#4,382 25 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Needs Triage Release 8.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This issue exists in the latest npm version
  • I am using the latest npm
Current Behavior

Running npm audit fails with a 404 error

% npm audit
npm WARN audit 404 Not Found - POST https://registry.npmjs.org/-/npm/v1/security/audits/quick
null
npm ERR! audit endpoint returned an error
%
Expected Behavior

I expect npm audit to work.

Steps To Reproduce
  1. Go to any existing project
  2. Run npm audit
  3. See error
Environment
  • npm: 8.4.1
  • Node.js: 16.13.0
  • OS Name: macOS Monterrey 12.1
  • System Model Name: MacBook Pro (16-inch, 2019)
  • npm config:
; node bin location = /usr/local/bin/node
; cwd = /Users/rpatrick/Projects/weblogic-toolkit-ui/webui
; HOME = /Users/rpatrick
; Run `npm config ls -l` to show all defaults.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing npm audit in an existing project with npm 8.4.1 and Node.js 16.13.0, then trace the request to the /-/npm/v1/security/audits/quick endpoint. Done means npm audit completes without the reported 404 or audit endpoint error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.