Skip to content

npm 常用命令

NPM是Node.js的包管理工具,它允许开发人员轻松安装、更新和管理依赖项和模块。

常用 NPM 命令

命令功能
npm install -g xxx全局安装包
npm install xxx在当前目录安装包
npm install [email protected]安装指定版本的包
npm uninstall -g xxx全局卸载包
npm uninstall xxx在当前目录卸载包
npm ls查看当前项目安装的包
npm list -g --depth 0查看所有全局安装包
npm update xxx更新指定的包

参考文献

  1. https://nodejs.org/