how to use npm delete one history version package All In One
how to use npm delete one history version package All In One
demo
https://www.npmjs.com/package/lit-version-wcui
# npm unpublish <package-name>@<version>
$ npm unpublish lit-version-wcui@1.0.0
https://docs.npmjs.com/unpublishing-packages-from-the-registry#using-the-command-line
https://docs.npmjs.com/uninstalling-packages-and-dependencies
https://docs.npmjs.com/cli/v8/commands/npm-unpublish
test
随便跳着删除指定版本 ✅
$ npm unpublish lit-version-wcui@1.0.2
重新发布使用已经删除掉版本号 ???
不可以
,防止历史已经使用的版本出现混乱的 bug
- 重新发布的版本号不可以比 npm 当前使用的版本号低 ❌
- 删除完所有比 1.0.2 版本号大的版本,重新发布 1.0.2 ❌
npm notice Publishing to https://registry.npmjs.org/
npm ERR! code E400
npm ERR! 400 Bad Request - PUT https://registry.npmjs.org/lit-version-wcui - Cannot publish over previously published version "1.0.2".
lit-wcui
// ❌
// import { WCUIElement } from 'lit-wcui';
// ✅
import 'lit-wcui';
https://www.npmjs.com/package/lit-wcui
refs
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/16525696.html
未经授权禁止转载,违者必究!