npm install xxx 安装模块

npm install xxx -g 将模块安装到全局环境中

npm ls 查看安装的模块及依赖

npm ls -g 查看全局安装的模块及依赖

npm uninstall xxx (-g) 卸载模块

npm cache clean 清理缓存

升级: npm update

卸载: npm uninstall

包依赖管理,通过package.json

例如:

{ "name":"myPackage", "version":"0.0.1", "dependencies":{ "abc":">0.0.2" } }