Replace Corepack after Node 25
Install Corepack on Node 25, enable its pnpm shim, and use the packageManager pin to reproduce a frozen install in CI.
Your CI image moves to Node 25 and the first setup step, corepack enable pnpm, now fails with corepack: command not found. The lockfile and the pnpm version in package.json are still useful. Add the missing tool to the image before the install step.
Install Corepack before enabling pnpm
Node 25 stopped distributing Corepack. Install it as a separate npm package and ask it to create a pnpm shim, the small executable that dispatches to the version the project requests.
npm install --global corepack@0.34.5
corepack enable pnpmThe second command creates the pnpm shims next to Corepack. If you already installed pnpm separately in that directory, check which executable owns the path before replacing it.
If it fails because that directory is read-only, install Corepack into a writable npm prefix and put its bin directory on PATH before enabling pnpm. If pnpm --version keeps reporting a different version, check command -v pnpm from the project root. A standalone pnpm earlier on PATH can take precedence over the shim.
Use the project's pin
If your repository already has a packageManager field, leave that pin in place and run the install from the project root. Corepack looks for the nearest package.json from your working directory. For a project without a pin, choose the pnpm release you want to use and record it once, on a development machine. For example:
corepack use pnpm@10.15.1
pnpm --versionCorepack records pnpm@10.15.1 with an integrity hash in package.json, runs an install, and the second command prints 10.15.1.
Commit the package-manager pin with any lockfile changes from that install. The Corepack documentation explains how it selects a version from the project. Pinning Corepack in the image keeps the bootstrap step reproducible, while the project chooses pnpm.
On a clean runner, use the pin that is already checked in.
pnpm install --frozen-lockfileThe install uses the project's pnpm version and fails if the checked-in lockfile would need to change.
An empty Corepack cache can require a pnpm download on the first invocation. In a networked image build, run corepack install from the project root to cache the pinned package-manager release. An offline dependency install also needs access to the packages in the pnpm lockfile.