npm 安装、卸载 模块或包的命令(转载)

npm安装卸载命令

来源:https://www.jianshu.com/p/e6ee00ea03cd

npm安装模块

  • 【npm install xxx】利用 npm 安装xxx模块到当前命令行所在目录;

  • 【npm install -g xxx】利用npm安装全局模块xxx;

  • 【npm install xxx】安装但不写入package.json;

  • 【npm install xxx –save】 安装并写入package.json的”dependencies”中;

  • 【npm install xxx –save-dev】安装并写入package.json的”devDependencies”中。

npm 删除模块

  • 【npm uninstall xxx】删除xxx模块;
  • 【npm uninstall -g xxx】删除全局模块xxx;

猜你喜欢

转载自www.cnblogs.com/hao-1234-1234/p/11493372.html