Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1.37 KB

pin-specific-pnpm-version-for-builds.md

File metadata and controls

35 lines (28 loc) · 1.37 KB

Pin Specific pnpm Version For Builds

Vercel recognizes when a project contain a pnpm-lock.yaml file and will automatically use pnpm for builds of that project.

It looks for the lockfileVersion in pnpm-lock.yaml to determine what major version of pnpm to install. If the lockfileVersion is 5.4, then it will use the latest pnpm v7. Otherwise it will fallback to the latest pnpm v6.

That's the extent of the control you have over the pnpm version. That is, unless you are to use this experimental corepack feature. Set the ENABLE_EXPERIMENTAL_COREPACK environment variable to 1 in your project's Environment Variables under Settings.

Then specify the pnpm version with the packageManager key in your package.json.

{
  "packageManager": "[email protected]"
}

Even though the current latest is 7.13.5, Vercel will see the Corepack environment variables and the packageManager version and use 7.13.2 instead.

See this PR and this issue for more details.