Pnpm
lastmod 2024-03-14created 2023-03-142 edits
Fast, efficient package manager
Features
- Fast. Up to 2x faster than the alternatives (see benchmark).
- Efficient. Files inside node_modules are linked from a single content-addressable storage.
- Great for monorepos.
- Strict. A package can access only dependencies that are specified in its package.json.
- Deterministic. Has a lockfile called pnpm-lock.yaml.
- Works as a Node.js version manager. See pnpm env use.
- Works everywhere. Supports Windows, Linux, and macOS.
- Battle-tested. Used in production by teams of all sizes since 2016.
- See the full feature comparison with npm and Yarn.
npm vs yarn vs yarn-berry vs pnpm
- 3 reasons we moved from Yarn to pnpm
- Comparing npm, yarn, and pnpm
- (Package managers) npm, yarn, pnpm, yarn-berry
Case 01
- 3 reasons we moved from Yarn to pnpm | GeekNews
- [Original] 3 reasons we moved from Yarn to pnpm
- Pain points experienced with Yarn Berry
- The ongoing load Yarn PnP puts on Git
- A persistent fight with Ghost Dependency
- Minor bugs in Yarn Workspace
- Package installation during deployment became about 30 seconds to 1 minute faster
- Packages are stored in a global store (Virtual Store) / linked to the project's node_modules via symlinks
- Duplicate packages are not installed, saving storage space and network
- Packages are linked to each other automatically, making monorepo setup simpler
- Features used in Yarn Berry, such as patch-package and dedupe, can be used almost as-is
See also
Favorite site
Pages that link here