javascript - How to delete a package that has been published in npm?
为情所困
为情所困 2017-05-18 11:03:04
0
2
810

npm unpublish
npm unpublish --force //Force deletion, but it seems that it is not actually deleted! ! !
npm unpublish guidest@1.0.1 //Specify the version number, but it doesn’t seem to be deleted

Clear the cache first:
npm cache clean
It doesn’t work either

After the above operations,
I still have this package under my npm account,
I can still install this package through npm install guitest
.

Why is this so?

为情所困
为情所困

reply all(2)
阿神

npm unpublish这个命令有的仓储支持,有的仓储不支持。npmjs.org早期也是支持的,但2015年后已经声明过不支持删除已经发布的包,详见npm issue。类似情况推荐使用命令npm deprecate

Ty80

Last year, there was a database deletion incident by a big cow, which caused the construction failure of many famous npm packages that relied on it, and even affected the production environment of many companies. Since then, npm has changed its unpublish strategy.
If I remember correctly, it seems that you can delete the library you published within half an hour, and then you can no longer delete it.
For detailed information, you can visit their blog on the npm official website.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!