【一些容易忘记的node的npm命令】【收集】

更新npm到最新版本

npm update -g npm

安装依赖包时命令的一些区别

npm install xxx -g //(全局安装)
npm install xxx --save-dev //(局部安装 显示在package.json的devDependencies中 开发环境)
npm install xxx --save //(局部安装 显示在package.json的dependencies中 运行环境 如react/vue/jquery/antd等必要工具包)
npm install xxx //(局部安装 不显示)

猜你喜欢

转载自www.cnblogs.com/wuhairui/p/10509496.html