如何删除 npm 中的 dist-tag? [英] How to remove a dist-tag in npm?
问题描述
目前正在学习npm
.
我有 2 个 dist 标签,beta: 1.0.1
&最新:1.0.1
.
I have 2 dist-tags, beta: 1.0.1
& latest: 1.0.1
.
我想删除 beta: 1.0.1
&我做不到.
I want to remove beta: 1.0.1
& I'm not able to do it.
我尝试了以下方法,不起作用.
I tried the following, doesn't work.
npm dist-tag rm beta 1.0.1
npm dist-tag rm beta
npm dist-tag rm 1.0.1
最糟糕的情况,npm 文档没有关于如何删除 dist-tag 的示例!
Worst condition, npm docs doesn't have examples on how to remove a dist-tag!
编辑:按照建议,浏览了 github 页面.要求更新 npm
的贡献者.还是没用.
Edit: As suggested, gone through the github page. Contributors asking to update npm
. Still didn't work.
推荐答案
根据 this how-to-npm
GitHub issue,你应该像这样删除dist-tag
:
According to this how-to-npm
GitHub issue, you should remove dist-tag
s like this:
npm dist-tag rm <module name> beta
其中
是从 package.json
中的 name"
参数复制而来的:
Where <module name>
is copied from "name"
parameter in package.json
:
{
"name": "@user/exampleNameOfModule",
^
... |
- copy this, without quotes
},
这篇关于如何删除 npm 中的 dist-tag?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!