我已经向 npm 发布了一个 grunt 插件,它通过使用master标签来跟踪 grunt 0.4 RC。我一直在发布:
npm publish --tag master
现在 grunt 0.4 final 已经发布,我latest通过以下方式重新发布了我的插件:
npm publish
我现在如何master从 npm 存储库中删除标签?它仍然在dist-tags我的时候列出npm view [my-plugin]。
提前致谢。
我已经向 npm 发布了一个 grunt 插件,它通过使用master标签来跟踪 grunt 0.4 RC。我一直在发布:
npm publish --tag master
现在 grunt 0.4 final 已经发布,我latest通过以下方式重新发布了我的插件:
npm publish
我现在如何master从 npm 存储库中删除标签?它仍然在dist-tags我的时候列出npm view [my-plugin]。
提前致谢。
npm在npm@2.5.0. _ 现在有一个命令行语法,只要您更新到新版本npm- 请参阅https://github.com/npm/npm/wiki/Troubleshooting#try-the-latest-stable-version-of- npm有关升级的完整详细信息。
安装最新版本的 npm
npm install -g npm # most common way to upgrade
清除包装中不再使用的标签。
npm dist-tag rm <pkg> <tag>
master可能在您的 npm 配置中。
检查这给出了什么:
npm config get tag
要重新使用latest,应该这样做:
npm config set tag latest
另一种可能性是使用以下master标签取消发布版本:
npm unpublish <name>[@<version>]
这很可能会删除 dist-tags 中的标签(但由于我没有尝试过,不确定)。
只是为了确认,(在 verdaccio 的私人回购中),您可以取消发布这样的标签:
npm unpublish <name>[@<version>]
这转化为(例如):
npm unpublish @yourdomain/your_package@1.1.100
这将删除相关标签。