-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npm unpublish returns error 404 and not error printed unless verbose loglevel is used #1469
Comments
Also having this problem with both
|
Having the same issue when running |
But I am logged in! This is in the exact same terminal session where I just published a new version as the owner of the package |
Oops! Nevermind that, I just logged out and logged back in and now both functions work, weird, sorry for the confusion! |
@luawtf Ah, in that case, it sounds like this is the same situation as mine -- these commands displaying 404 Not Found when the actual issue is authentication-related. |
Yep! I agree that a more general and verbose error would be great. |
Agreed. Seems odd for packages that are already public -- there's nothing to be gained security-wise by returning a 404 rather than 401 in this case. It would make sense if a package was private, much like how GitHub shows a 404 if you try and access a private repo when logged out so as to not give away the fact there's anything at all at that URL. |
I can confirm the issue was that I was not logged in. |
we ran into this with a public package as well. |
I have the same problem, being unable to $ node -v
v14.15.0
$ npm -v
6.14.8
$ npm deprecate @alling/foo-bar "This package should not be used."
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@alling%2ffoo-bar - Not found
npm ERR! 404
npm ERR! 404 '@alling/foo-bar@latest' 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. |
@SimonAlling what happens with npm v7.0.11? |
$ docker run -it node bash
# npm -v
7.0.8
# npm login
Logged in as alling on https://registry.npmjs.org/.
npm notice
npm notice New patch version of npm available! 7.0.8 -> 7.0.11
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.0.11
npm notice Run npm install -g npm@7.0.11 to update!
npm notice
# npm deprecate nonexisting-package-asdfasdf LOL
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/nonexisting-package-asdfasdf?write=true
npm ERR! 404
npm ERR! 404 'nonexisting-package-asdfasdf@latest' 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 deprecate @alling/foo-bar "This package should not be used." No error or other output, but no deprecation message showed up on the package page (i.e. https://www.npmjs.com/package/@alling/foo-bar), even after like half an hour, so I tried running the command again: # npm deprecate @alling/foo-bar "This package should not be used."
npm ERR! code E422
npm ERR! 422 Unprocessable Entity - PUT https://registry.npmjs.org/@alling%2ffoo-bar - Unprocessable Entity However, if I go to a specific version of the package (e.g. https://www.npmjs.com/package/@alling/foo-bar/v/1.1.6), I see the expected deprecation message*. But I want it to show up on the main package page as well (like e.g. * Latest version: This package has been deprecated. Any other version: This version has been deprecated. EDIT: The deprecation message finally showed up on the main package page. |
That’s using npm v7.0.8; can you |
The deprecation message finally appeared on the main package page, so I believe it works with npm v7.0.8. 🙂 |
Logging in or logging in after log out solves the issue. Seems like an authentication problem. |
npm If your bug is reproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
What / Why
npm unpublish
does not work, and does not show any error even though the registry answers with a code 404.When
npm unpublish @siliceum/calcite-cli@0.1.0 --loglevel verbose
Where
npm public registry
How
Current Behavior
The command line only prints
while the server answers with an error 404.
Also, the endpoint
https://registry.npmjs.org/@siliceum%2fcalcite-cli
returns information but the version with?write=true
(https://registry.npmjs.org/@siliceum%2fcalcite-cli?write=true
) returns an error 404 not found.Steps to Reproduce
npm unpublish @siliceum/calcite-cli@0.1.0
Expected Behavior
The package is either unpublished or an error is printed. (ultimately, something else than a 404).
With the verbose loglevel it is possible to have the following output
npm unpublish @siliceum/calcite-cli@0.1.0 --loglevel verbose
The text was updated successfully, but these errors were encountered: