【备忘】npm yarn pnpm 命令对比

作用 npm yarn pnpm
安装 npm install yarn install pnpm install
安装的简写 npm i yarn add pnpm add
强制安装 pnpm install --force
卸载 npm unintall yarn remove pnpm remove
卸载简写 npm rm yarn rm pnpm rm
全局安装 npm i xxx --global/-g yarn global add xxx pnpm add -g xxx
安装包(生产模式) npm i xxx --save/-S yarn add xxx pnpm add xxx
开发模式安装包 npm i xxx --save-dev/-D yarn add xxx -dev/-D pnpm add -D xxx
检查更新 npm outdated
更新 npm update yarn upgrade pnpm update
全局更新 npm update -g yarn global upgrade pnpm update -g
运行 npm run xxx yarn run pnpm run xxx
清除缓存 npm cache clean yarn cache clean
动态包执行 npx xxx yarn dlx xxx pnpm dlx xxx
查看全局安装的包 npm list -g --depth 0 yarn global list pnpm list -g
相关推荐
Mr_Mao2 小时前
Naive Ultra:中后台 Naive UI 增强组件库
前端
前端小趴菜053 小时前
React-React.memo-props比较机制
前端·javascript·react.js
摸鱼仙人~4 小时前
styled-components:现代React样式解决方案
前端·react.js·前端框架
sasaraku.5 小时前
serviceWorker缓存资源
前端
RadiumAg6 小时前
记一道有趣的面试题
前端·javascript
yangzhi_emo6 小时前
ES6笔记2
开发语言·前端·javascript
yanlele6 小时前
我用爬虫抓取了 25 年 5 月掘金热门面试文章
前端·javascript·面试
中微子7 小时前
React状态管理最佳实践
前端
烛阴7 小时前
void 0 的奥秘:解锁 JavaScript 中 undefined 的正确打开方式
前端·javascript
中微子7 小时前
JavaScript 事件与 React 合成事件完全指南:从入门到精通
前端