卸载和安装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