本地操作
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本身