是否可以重新发布未发布的 npm 包?

Is it possible to republish an unpublished npm package?

总结

我在几年前(大致)向 npm 存储库发布了一个包 (license-plate-serial-generator),然后在几个月前取消了发布。我现在想重新发布它。

我不清楚是否可以重新发布未发布的包,因为我尝试这样做的结果喜忧参半

我试过的

我提高了包版本并于昨天发布了新版本。 npm publish 成功了,我收到了一封包含以下内容的电子邮件:

Hi ptrkcsk!

A new version of the package license-plate-serial-generator (0.2.3) was published at 2021-12-23T00:02:52.024Z…

但是,该软件包在 npm 上仍然大部分不可用:


npm docs page for 'Unpublishing packages from the registry' 说:

Unpublishing a package permanently removes the package from the registry so it is no longer available for other users to install. Once a package is unpublished, republishing under the same name is blocked for 24 hours.

令我感到困惑的是,取消发布是 'permanent',但可以在取消发布后 24 小时重新发布

此问题已解决。我 contacted npm。他们那边清除缓存后让我发布一个新版本,现在已经完全重新发布了。