Initial Vercel deployment failed - Yarn version issue

Setting up my first deploy with RedwoodJS using Vercel. I ran the setup deploy vercel command and checked in the change, then went to Vercel to initialize the new project.

When doing my initial deploy, Vercel says Deployment failed with error. Here are the logs:

Running build in Washington, D.C., USA (East) – iad1
Cloning (Branch: main, Commit: 1afbb96)
Previous build cache not available
Cloning completed: 484.887ms
Running "vercel build"
Vercel CLI 33.5.1
Installing dependencies...
yarn install v1.22.17
[1/5] Validating package.json...
error @: The engine "yarn" is incompatible with this module. Expected version ">=1.22.21". Got "1.22.17"
error Found incompatible module.
info Visit for documentation about this command.
Error: Command "yarn install" exited with 1

I checked my package root package.json and indeed it requires

  "engines": {
    "node": "=18.x",
    "yarn": ">=1.22.21"

Any ideas on what to do here? Should I just edit my package.json to allow an earlier yarn version?

I dropped the version requirement for Yarn to ">=1.22.17" and the deploy seems to be working now; is there a way to know why the requirement was set to patch version 21?

It seems like there was probably a reason that I maybe find out eventually…

1 Like

Hey @jason-curtis, glad you figured it out! We’ve removed it from the v7 create redwood app template as well, which is going to be released soon.

Haha I know that feeling. Luckily I can solve this mystery for you… It’s an artifact and no longer matters.

If there was a reason for the 21 patch, it’s just that that was the last version of yarn 1 released.

1 Like