是否可以重新发布未发布的 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 install
失败并显示相对模糊的错误消息:
$ npm install license-plate-serial-generator
npm ERR! code ENOVERSIONS
npm ERR! No versions available for license-plate-serial-generator
...
npm info
失败并显示一条明确的错误消息:
$ npm info license-plate-serial-generator
npm ERR! code E404
npm ERR! 404 Unpublished by ptrkcsk on 2021-07-29T21:32:41.957Z
npm ERR! 404
npm ERR! 404 'license-plate-serial-generator' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
...
- package pagereturns一个404:
- 包裹出现在搜索中:
- 在我的 npm 帐户包页面中,包数包括 license-plate-serial-generator,但它没有显示在包列表中
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。他们那边清除缓存后让我发布一个新版本,现在已经完全重新发布了。
总结
我在几年前(大致)向 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 install
失败并显示相对模糊的错误消息:$ npm install license-plate-serial-generator npm ERR! code ENOVERSIONS npm ERR! No versions available for license-plate-serial-generator ...
npm info
失败并显示一条明确的错误消息:$ npm info license-plate-serial-generator npm ERR! code E404 npm ERR! 404 Unpublished by ptrkcsk on 2021-07-29T21:32:41.957Z npm ERR! 404 npm ERR! 404 'license-plate-serial-generator' is not in this registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) ...
- package pagereturns一个404:
- 包裹出现在搜索中:
- 在我的 npm 帐户包页面中,包数包括 license-plate-serial-generator,但它没有显示在包列表中
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。他们那边清除缓存后让我发布一个新版本,现在已经完全重新发布了。