Requesting Node.js 22.18.0 and Yarn 1.22.22 Update for Vercel Builds

I’m encountering a build error on Vercel related to Node.js version:

Running "install" command: `yarn install --frozen-lockfile`...
yarn install v1.22.19
[1/5] Validating package.json...
error [repo]: The engine "node" is incompatible with this module. Expected version ">=22.18.0 <23.0.0". Got "22.17.1"
error Found incompatible module.

I found that it isn’t recommended to do this range but I was hoping to try Node.js 22.18 since the type stripping is enabled by default in this version.

Also, I’ve noticed that Yarn 1.22.19 is being used in the build environment, despite 1.22.22 being the latest stable version of Yarn 1.x.

My question is around when do this typically gets upgraded? Only when severety happens on the minor or patch version that requires an update? If so, can we put a fixed version? I remember in the docs that we can’t do it in Node but how about yarn?

My questions are:

  1. When do Vercel build environments typically get upgraded to include the latest patch or minor versions of Node.js (e.g., from 22.17.1 to 22.18.0)? Is this typically only for critical security fixes or major version bumps?
  2. Is there a way for us to specify or enforce a fixed Node.js patch version (like 22.18.0) or a specific Yarn version (1.22.22) within our Vercel build configuration? I understand that directly fixing Node.js versions might not be recommended or possible per the Vercel docs, but I’m curious if there are any new developments or workarounds, especially regarding Yarn.

Our Build container currently support Node v22.18.0 and automatically upgrade when newer version is available. If you just use 22.x in engines property within package.json, you should get Node v22.18.0. To verify, you can prepend node -v in your build or install command which will echo node version.

1 Like

Thanks for the answer. I’ll try it and let you know. Is there any reason why the yarn version is not pulling the latest 1.x version? Do I also need to specify it in package.json?

Unfortunately, it uses Node v22.17.1. Also, it looks like it doesn’t auto-install Yarn version that I specified on my package.json as it still uses 1.22.19 instead of 1.22.22.

$ node -v && next build --turbopack
v22.17.1