404 error while publishing npm package - `npm ERR! 404 Not Found - PUT https://registry.npmjs.org/`
Asked Answered
J

3

2

On npm publish following error is thrown. Had worked before.

npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@XYZ - Not found
npm ERR! 404
npm ERR! 404  '@[email protected]' is not in the npm 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.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2021-11-11T06_46_42_252Z-debug.log
Jugglery answered 11/11, 2021 at 7:11 Comment(0)
J
4

Run the npm login command

E:\XYZ>npm login
Username: XXXXX
Password:
Email: (this IS public) myemail id
Logged in as XXXXXon https://registry.npmjs.org/.

and then publish again

Jugglery answered 11/11, 2021 at 7:11 Comment(0)
R
1

I solve this issue by changing the registry from https://registry.npmjs.org to https://registry.npmjs.org/, there is an extra slash at the end of the line.

Revoke answered 22/6, 2022 at 3:34 Comment(0)
D
1

In my case, after checking that I'm logged in by npm whoami I needed to be added to the organization that own the repo I wanted to publish the packaged for.

Delanie answered 9/1, 2023 at 7:27 Comment(1)
exactly your answer helped me! thank you. I thought that I was authorized, but in fact something was wrong with loginDisjoint

© 2022 - 2024 — McMap. All rights reserved.