Skip to content

[BUG] npm owner add <user> <package name> wrong error message #5308

@fatiudeen

Description

@fatiudeen

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

I tried to add a contributor to a package and got the following error:

npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@ilerah%2fcommons/-rev/19-18d0164ca1925c64982d29683aa09ea3 - Team not found
npm ERR! 404
npm ERR! 404 '@ilerah/commons@latest' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Expected Behavior

I found out that the cause of the error was authorization after a while so I expected an appropriate error message.

Steps To Reproduce

  1. Make sure you are not logged in the npm CI
  2. Run npm owner add

Environment

  • npm: 8.5.0

  • Node.js: 16.14.2

  • OS Name: Kali GNU/Linux Rolling

  • System Model Name: Dell Inc. Inspiron 3542

  • npm config:

; "user" config from /home/fatiudeen/.npmrc

//registry.npmjs.org/:_authToken = (protected) 

; node bin location = /home/fatiudeen/.nvm/versions/node/v16.14.2/bin/node
; cwd = /home/fatiudeen
; HOME = /home/fatiudeen
; Run `npm config ls -l` to show all defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 8.xwork is associated with a specific npm 8 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions