xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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

  1. 重新发布的版本号不可以比 npm 当前使用的版本号低 ❌

  1. 删除完所有比 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

https://stackoverflow.com/questions/62273895/how-do-you-delete-all-previous-versions-of-a-published-npm-package-and-use-the-l



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-07-27 17:34  xgqfrms  阅读(54)  评论(1编辑  收藏  举报