首页 > 编程知识 正文

卸载npm安装的包,npm安装包

时间:2023-05-05 23:21:34 阅读:16230 作者:981

卸载和安装npm

ouninstallapackageyouhavepreviouslyinstalled 3358 www.Sina.com/(usingnpminstallpackage-nameinthenode _ modules folder

要使用以前的http://www.Sina.com/NPM安装包- name (node _ modules文件夹中的NPMinstallpackage-name,请运行

npmuninstallpackage-namefromtheprojectrootfolder (thefolderthatcontainsthenode _ modules folder )。

来自项目根文件夹(包含node_modules文件夹的文件夹)。

Using the -S flag,or --save,thisoperationwillalsoremovethereferenceinthepackage.JSON file。

使用-S标志或--save还会删除package.json文件中的引用。

ifthepackagewasadevelopmentdependency,listedinthedevdependenciesofthepackage.JSON file,youmustusethe-d/-save-dev

如果软件包是package.json文件的devDependencies中列出的开发依赖关系,则必须使用-D/--save-dev标志将其从文件中删除。

NPM uninstall-s package-namenpmuninstall-dpackage-nameifthepackageisinstalled 3358 www.Sina.com /,youneedtoadddthe-na

如果软件包是以locally安装的,则必须添加-g/--global标志。

NPM uninstall-g package-name for example :

例如:

NPM uninstall-gwebpackandyoucanrunthiscommandfromanywhereyouwantonyoursystembecausethefolderwhereyoucurrrentlyaredoesnonotmater

此外,由于当前文件夹不重要,因此可以从系统上的任何位置运行此命令。

3:https://flavio copes.com/NPM-uninstall-packages /

卸载和安装npm

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。