vercel
vercel copied to clipboard
Vercel doesn't seem to run pnpm with v7 in CI
pnpm changed from lockfileVersion: 5.3
to lockfileVersion: 5.4
in v7.
I redeployed without cache but there is still a warning in the pipeline like this:
08:37:34.173 | Installing build runtime...
08:37:36.081 | Build runtime installed: 1.907s
08:37:37.425 | No Build Cache available
08:37:37.735 | Running "install" command: `pnpm install`...
08:37:38.329 | Scope: all 7 workspace projects
08:37:38.448 | WARN Your pnpm-lock.yaml was generated by a newer version of pnpm. It is a compatible version but it might get downgraded to version 5.3
08:37:38.449 | Lockfile is up-to-date, resolution step is skipped
pnpm v6 and v7 differs quite a bit so installing with the older version could lead to issues.
UPDATE on 7th August: When fixing the issue, it would be great if the Vercel team could make sure not only to check for a string of lockFileVersion: 5.4
but rather if the string includes that part. This is important because the value can also be lockfileVersion: 5.4-inlineSpecifiers
when use-inline-specifiers-lockfile-format
is enabled with was part of this release: `https://github.com/pnpm/pnpm/releases/tag/v7.7.0
The version that currently runs on Vercel is 7.1.7
, which is still quite out of date (I need pnpm patch
support which was only added in 7.4.0). It would be nice if Vercel was to read the version from packageManager
field in package.json
.
As workaround we specified a custom install command in Vercel UI now as npm i [email protected] -g
, should help you with the patching ;)
Just a workaround though, not how it's supposed to behave.
Please try out corepack https://vercel.com/changelog/corepack-experimental-is-now-available
It lets you select a specific pnpm version which should solve this issue, thanks!
Please try out corepack vercel.com/changelog/corepack-experimental-is-now-available
Thanks, that is another way to work around the issue I guess!
@styfle the corepack approach didn't work for some reason. Specifying custom install
command npm i [email protected] -g && pnpm install
did work however
@tonyxiao Did you add ENABLE_EXPERIMENTAL_COREPACK=1
to your Project's Environment Variables?
@styfle yep added it. In the end I did something like npm i [email protected] -g
which worked.
There's an extra step of setting the "packageManager" that I missed, now it works.
It lets you select a specific pnpm version which should solve this issue, thanks!
In a monorepo context, setting this value in the root package.json was enough it seems.
pnpm 8 still not install dependencies.In thhe local works well.vercel not install dependencies.
Why does Vercel still not use a pnpm
version that supports pnpm patch
by default in 2024?
Patches just silently not apply, which is very confusing.