pnpm Commands
Disk-efficient Node.js package manager.All pnpm pages
- pnpm --filter: run a script in one workspace packagepnpm --filter PKG run build runs a script only in the matching workspace packages. Add ... to include dependencies, use globs, directories or "[origin/main]".
- pnpm dlx: run a package without installing it (the pnpm npx)pnpm dlx runs a package once without adding it to package.json or node_modules, like npx. Pin versions, pick the binary with --package, and pnpm create.
- pnpm update --latest: update dependencies to the latest versions with pnpmpnpm update stays within package.json ranges; pnpm update --latest moves to the newest release and rewrites them. pnpm outdated, -i, -r and the common pitfalls.
- pnpm why package: find out why a dependency is installedpnpm why pkg prints every dependency chain that installs a package, with versions. Use -r for workspaces, --json for scripts, then fix it with overrides.