npm命令

作者: Sophie_Wang | 来源:发表于2017-12-01 15:20 被阅读6次

本地操作

npm install lodash(包名)

ls node_modules   //查看已安装的npm包

npm update   //更新本地npm包

npm outdated  //找出需要更新的包

npm uninstall lodash(包名) //卸载npm包

npm uninstall --save lodash(包名) //卸载dependencies中的npm包

npm uninstall --save-dev lodash(包名) //卸载devdependencies中的npm包

全局操作 【加上-】

npm update -g         //更新所有npm包

npm outdated -g --depth=0    //找出哪些包需要被更新

npm update -g jshint   //更新具体某个包

[sudo] npm install npm@latest -g   //更新npm本身

相关文章

网友评论

      本文标题:npm命令

      本文链接:https://www.haomeiwen.com/subject/wykwbxtx.html