| npm command | Yarn command | pnpm equivalent | bun equivalent |
|---|---|---|---|
| npm install | yarn | pnpm install | bun install |
| npm install [pkg] | yarn add [pkg] | pnpm add [pkg] | bun add [pkg] |
| npm uninstall [pkg] | yarn remove [pkg] | pnpm remove [pkg] | bun remove [pkg] |
| npm update | yarn upgrade | pnpm update | bun update |
| npm list | yarn list | pnpm list | ? |
| npm run [scriptName] | yarn [scriptName] | pnpm [scriptName] | bun run [scriptName] |
| npx [command] | yarn dlx [command] | pnpm dlx [command] | bunx [command] |
| npm exec | yarn exec [commandName] | pnpm exec [commandName] | ? |
| npm init [initializer] | yarn create [initializer] | pnpm create [initializer] | bun create [initializer] |
Source: https://refine.dev/blog/pnpm-vs-npm-and-yarn/#migrating-from-npmyarn-to-pnpm