Deploy fails, citing a "missing" framework that is plainly in my lockfile (RedwoodJS)

Hello! Scroll to bottom for site URL, full deploy log, and build settings.

Here’s my situation:

I’m building a RedwoodJS site.
I’ve pushed my latest site changes to GitHub, which triggers a Netlify build. The Netlify build is failing consistently. According to the Netlify build logs, the failing step is yarn rw deploy netlify. A critical-looking error message in the log dump says: Internal Error: root-workspace-0b6124@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
This error has never come up before today. The exact same site has built and deployed successfully on Netlify in the past, with the exact same lockfile. I haven’t changed the lockfile since the last successful deployment, which was a few months ago. My Git history confirms this.
The package named by the error message, root-workspace-0b6124@workspace:. , is definitely in yarn.lock . It has been there since my project’s initial commit; Redwood’s bootstrap script put the package in the lockfile automatically, and I haven’t touched it since. I checked the contents of my branch on GitHub, too—same result; the package IS in the lockfile there.
Why does Netlify think that my lockfile lacks this package, when GitHub and my local machine both think the lockfile includes the package? Am I interpreting the error correctly?
Next, I tried running yarn install locally, and this resulted in no diff according to Git. I double-checked that I haven’t added yarn.lock to my .gitignore—indeed, the file is being tracked.
I tried the manual “clear cache and redeploy site” option, and I got identical results.
I checked: I’m building main@HEAD, which is exactly the commit I expect. So that’s not the issue.
As a desperate measure, I deleted the Netlify site and recreated it. With the very first build of the new site, I ran into the same issue. I think something must have changed in Netlify’s build system recently.
Since the logs complain that I need to run yarn install on the Netlify CI machine, I modified netlify.toml and changed build.command to yarn install && yarn rw deploy netlify. I pushed this change to an experimental branch and had Netlify attempt a “branch deploy” of that commit. That version of the build simply hangs. It complains that peer dependencies are incorrectly met during the yarn install step, and it seems never to begin the yarn rw deploy netlify step.
Details of the original build (for the main branch, not the topic branch) are given below.

Site name: desti.netlify.app

Full deploy log: Netlify App

Build settings:

I solved it myself: I had to go into my project’s Yarn manifest and specify that a lower version of Yarn (1.x, rather than 3.x) should be used. Then, I had to re-run yarn install locally, which generated diffs to my lockfile. Then, I had to push the lockfile to GitHub. THAT fixed the issue—the next build completed successfully.

1 Like

Hi @langhisc :wave:t6: , welcome to the forums! We are so glad you are here. Sorry to hear about your deploy failures. I am glad to know you you were able to solve this problem on your own. This will help other users who are struggling with a similar issue. We appreciate the feedback greatly. :smiling_face_with_three_hearts: