pnpm (performant npm) is a fast, disk space efficient package manager for JavaScript and TypeScript projects. It differentiates itself by using a content-addressable filesystem with hard links and symlinks to store all files from all module directories on a disk, saving significant disk space and speeding up installations, especially in monorepos. The current stable version is 10.33.0, with active development ongoing for the upcoming version 11.0.0, which introduces several breaking changes and new features.
npm install pnpmVerified import paths — ran on the pinned version, not inferred.
This TypeScript quickstart demonstrates how to programmatically execute `pnpm install` for a project using the `execa` library, which is a common way to interact with CLI tools from Node.js applications. It logs the output and handles potential errors during the installation process.
Upgrade your Node.js environment to version 22 or higher. For standalone executables on Linux, ensure glibc 2.27 or newer is available. If using pnpm as a Node.js module, ensure your project environment supports pure ESM.
Migrate your configuration to use the `pmOnFail` setting in `pnpm-workspace.yaml` or through the CLI. Remove any references to the deprecated settings and environment variable.
Update your `auditConfig` in `pnpm-workspace.yaml` (or global config) to use `auditConfig.ignoreGhsas` instead of `auditConfig.ignoreCves`. Replace any CVE-YYYY-NNNNN entries with their corresponding GHSA-xxxx-xxxx-xxxx values, which can be found in the 'More info' column of `pnpm audit` output.
Refactor your build-related configurations to use the `allowBuilds` map in `pnpm-workspace.yaml`. This setting allows explicit control over script execution for specific packages.
If your workflow requires immediate resolution of new packages or allows exotic subdependencies, configure `minimumReleaseAge: 0` and/or `blockExoticSubdeps: false` in your `pnpm-workspace.yaml` or global config.
Adjust any automated scripts or CI/CD pipelines that parse pnpm's CLI output for script execution or peer dependency issues. Use `pnpm peers check` for detailed peer dependency reports.
Review existing tooling and scripts that rely on the `node_modules` structure. For ESM resolution issues, consider using `packageExtensions` or `@pnpm/plugin-esm-node-path` as workarounds.
Upgrade your Node.js version to meet the required specification. Use `pnpm env use <version>` or a Node.js version manager (e.g., `nvm`, `volta`) to switch to a compatible version.
Update your pnpm version to match the one that generated the lockfile, or run `pnpm install` locally with the current pnpm version to migrate the lockfile, then commit the changes. Alternatively, use `pnpm install --no-frozen-lockfile` (though this is not recommended for CI).
Rename `auditConfig.ignoreCves` to `auditConfig.ignoreGhsas` in your `pnpm-workspace.yaml` or global config file, and update any CVE-XXXX-YYYYY entries to their corresponding GHSA-XXXX-XXXX-XXXX values.
Install the missing peer dependencies, or explicitly define `peerDependencyRules.ignoreMissing` and/or `peerDependencyRules.allowedVersions` in `pnpm-workspace.yaml` to tolerate specific issues. Consider running `pnpm peers check` for detailed information.
Ensure that all direct and transitive dependencies are explicitly listed in the `dependencies` or `devDependencies` of the `package.json` for the package requiring them. If a package is being used in a way that bypasses pnpm's strict linking (e.g., hoisted modules for ESM), review the `nodeLinker` and `shamefullyHoist` settings, or use `packageExtensions`.
No dependency data recorded yet.