Skip to content

[BUG] 404 for team gives misleading and scary message about package not in registry (because 404 handling) #8257

Open
@reggi

Description

@reggi

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

  pkg npm access grant read-only saki-test:xxxdevelopers meowmeowmeow-chitty-bang-bang --loglevel=silly
npm verbose cli /Users/reggi/.nvm/versions/node/v22.9.0/bin/node /Users/reggi/.nvm/versions/node/v22.9.0/bin/npm
npm info using npm@11.3.0
npm info using node@v22.9.0
npm silly config load:file:/Users/reggi/Documents/GitHub/cli/npmrc
npm silly config load:file:/Users/reggi/Desktop/pkg/.npmrc
npm silly config load:file:/Users/reggi/.npmrc
npm silly config load:file:/Users/reggi/.nvm/versions/node/v22.9.0/etc/npmrc
npm verbose title npm access grant read-only saki-test:xxxdevelopers meowmeowmeow-chitty-bang-bang
npm verbose argv "access" "grant" "read-only" "saki-test:xxxdevelopers" "meowmeowmeow-chitty-bang-bang" "--loglevel" "silly"
npm verbose logfile logs-max:10 dir:/Users/reggi/.npm/_logs/2025-04-25T14_40_27_210Z-
npm verbose logfile /Users/reggi/.npm/_logs/2025-04-25T14_40_27_210Z-debug-0.log
npm silly logfile start cleaning logs, removing 1 files
npm silly logfile done cleaning log files
npm http fetch PUT 404 https://registry.npmjs.org/-/team/saki-test/xxxdevelopers/package 311ms
npm verbose stack HttpErrorGeneral: 404 Not Found - PUT https://registry.npmjs.org/-/team/saki-test/xxxdevelopers/package - Team not found
npm verbose stack     at /Users/reggi/Documents/GitHub/cli/node_modules/npm-registry-fetch/lib/check-response.js:103:15
npm verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
npm verbose stack     at async Object.setPermissions (/Users/reggi/Documents/GitHub/cli/workspaces/libnpmaccess/lib/index.js:106:3)
npm verbose stack     at async #grant (/Users/reggi/Documents/GitHub/cli/lib/commands/access.js:119:5)
npm verbose stack     at async Npm.exec (/Users/reggi/Documents/GitHub/cli/lib/npm.js:208:9)
npm verbose stack     at async module.exports (/Users/reggi/Documents/GitHub/cli/lib/cli/entry.js:67:5)
npm verbose statusCode 404
npm verbose pkgid meowmeowmeow-chitty-bang-bang@*
npm error code E404
npm error 404 Not Found - PUT https://registry.npmjs.org/-/team/saki-test/xxxdevelopers/package - Team not found
npm error 404
npm error 404  'meowmeowmeow-chitty-bang-bang@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm verbose cwd /Users/reggi/Desktop/pkg
npm verbose os Darwin 24.3.0
npm verbose node v22.9.0
npm verbose npm  v11.3.0
npm verbose exit 1
npm verbose code 1

Expected Behavior

No response

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...

Environment

  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions