Error on updating packages in npm
Asked Answered
Q

2

11

I get this error when updating my package.

"cannot be republished until 24 hours have passed" in nodejs

Quiteris answered 7/2, 2018 at 10:17 Comment(0)
S
16

Your package was most likely unpublished with npm-unpublish. If it is so, you can publish your package again only after 24 hours.

Sphenoid answered 18/3, 2018 at 10:2 Comment(5)
In my case, I didn't unpublish the whole package. I only unpublished one version, which was the only version. And now I see the same error message :(Puisne
Same happened to me. Unpublished a specific - and the only - version and now I have to wait 24 hours.Tahsildar
github.com/npm/rfcs/discussions/355 change request to give a warningMicrobalance
Just happened to me as well .. unpublished the first and only version of a package. Damn.Py
In my case it was not even the last version, I had published the package with npm default version 1.0.0 accidentally then I added another version 0.0.1 to fix that because I like to start packages that way, after that I unpublished the version 1.0.0 but the whole package was removed, where do I report this bug?Archdiocese
M
6

This will happen after you unpublished all versions with npm-unpublish. e.g.:

npm unpublish <package-name> -f

Sadly they do not warn you even if you just removed the last version e.g.:

npm unpublish <package-name>@<version>

after 24 hours it should work anyway.

I created a change request to give a warning about that.

Microbalance answered 30/3, 2021 at 7:30 Comment(1)
as of version 8.3.1 a pull request to fix this with a warning has been accepted, see: github.com/npm/cli/pull/4191Microbalance

© 2022 - 2024 — McMap. All rights reserved.