Fsevents@patch causing YN0028, preventing deploy of redwood js app

site name: startling-cocada-4e612c.netlify.app
repo: tmt-redwood-js

I largely followed this guide but builds are consistently failing:

4:54:55 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
4:54:55 PM: ➤ YN0085: │ + fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>::version=2.3.3&hash=df0bf1, and 4 more.
4:54:55 PM: ➤ YN0085: │ - fsevents@patch:fsevents@npm%3A1.2.13#~builtin<compat/fsevents>::version=1.2.13&hash=d11327, and 4 more.
4:54:55 PM: ➤ YN0000: └ Completed in 28s 794ms
4:54:55 PM: ➤ YN0000: ┌ Post-resolution validation
4:54:55 PM: ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.

I’ve tried adding fsevents as an explicit dependency, both @2.3.3 and @1.2.13. I’ve also tried setting the ENABLE_EXPERIMENTAL_COREPACK environment variable to 1 as suggested by this thread on RedwoodJS + Vercel (which I know is different than Netlify but the underlying error seemed similar.) Nothing has worked.

Any suggestions would be greatly appreciated, thanks.

Looks like an issue with the yarn.lock? Have you tried deleting the node_modules and yarn.lock and recreating it?

Yes, about a dozen times.

I was able to bypass that by referring to: yarnpkg - getting YN0028 The lockfile would have been modified by this install, which is explicitly forbidden. using yarn berry and heroku - Stack Overflow