pnpm
pnpm is a fast, disk-space efficient package manager that utilizes hard links and symlinks to save space and speed up installations. The current stable version is 10.33.0, with version 11.0.0 actively in release candidate phase, indicating a continuous and significant development cadence.
Common errors
-
Incompatible lockfile
cause The `pnpm-lock.yaml` file was created by a different pnpm version or has integrity issues.fixEnsure your pnpm version matches the one used to generate the lockfile. In CI, use `pnpm install --frozen-lockfile` to strictly check compatibility, or `pnpm install --lockfile-only` if generating a new lockfile is intended. -
pnpm: Node.js version is not supported
cause Attempting to run pnpm v11+ with an unsupported Node.js version (e.g., Node.js 18, 19, 20, or 21).fixUpgrade your Node.js environment to version 22 or higher to meet pnpm v11's requirements. -
Peer dependency issues found. Run 'pnpm peers check' to view details.
cause Your project's dependencies have unresolved or conflicting peer dependency requirements.fixExecute `pnpm peers check` to get a detailed report of the issues and suggested fixes, then adjust your dependencies accordingly. -
The setting 'auditConfig.ignoreCves' is no longer recognized.
cause You are using `auditConfig.ignoreCves` in pnpm v11+, which has been replaced by GitHub Advisory IDs (GHSAs).fixReplace `auditConfig.ignoreCves` with `auditConfig.ignoreGhsas` in your pnpm configuration. -
The setting 'managePackageManagerVersions' is no longer recognized.
cause You are using the deprecated `managePackageManagerVersions` setting in pnpm v11+.fixRemove `managePackageManagerVersions` and use the `pmOnFail` setting instead.
Warnings
- breaking pnpm v11 and later require Node.js 22 or higher. Support for Node.js 18, 19, 20, and 21 is dropped.
- breaking The `pnpm audit` command in v11+ now uses GitHub advisory IDs (GHSAs) instead of CVEs. The configuration setting `auditConfig.ignoreCves` is no longer recognized and must be replaced with `auditConfig.ignoreGhsas`.
- breaking Settings `managePackageManagerVersions`, `packageManagerStrict`, and `packageManagerStrictVersion` have been removed in pnpm v11. Their functionality is now subsumed by the `pmOnFail` setting.
- gotcha pnpm v11 enables supply-chain protection by default. `minimumReleaseAge` defaults to 1 day (preventing new package resolutions for 24h), and `blockExoticSubdeps` defaults to `true`.
- breaking pnpm v11 replaces old build-dependency settings (`onlyBuiltDependencies`, `onlyBuiltDependenciesFile`, `neverBuiltDependencies`) with a new `allowBuilds` setting.
Install
-
npm install pnpm -
yarn add pnpm -
pnpm add pnpm
Quickstart
pnpm install