`yarn redwood dev` throwing Internal Error

I’m volunteering with an open source project and they want to use redwoodjs. I’m trying to go through the tutorial but I’m having issues with the first step. I’m running on a M1 MBP with yarn version 4.02 and Node v20.9.0. Simply running the first steps of the tutorial:

yarn create redwood-app --ts ./redwoodblog
yarn install #this isn’t actually listed in tutorial but is in next steps from previous command
yarn redwood dev

➤ YN0000: · Yarn 4.0.2

➤ YN0000: ┌ Resolution step

➤ YN0085: │ + fsevents@patch:fsevents@npm%3A1.2.13#optional!builtin<compat/fsevents>::version=1.2.13&hash=d11327, and 4 more.

➤ YN0085: │ - fsevents@patch:fsevents@npm%3A1.2.13#~builtin<compat/fsevents>::version=1.2.13&hash=d11327, and 4 more.

➤ YN0000: └ Completed in 12s 183ms

➤ YN0000: ┌ Post-resolution validation

➤ YN0060: │ react is listed by your project with version 18.2.0, which doesn’t satisfy what @redwoodjs/router (p1eae0) and other dependencies request (but they have non-overlapping ranges!).

➤ YN0060: │ react-dom is listed by your project with version 18.2.0, which doesn’t satisfy what @redwoodjs/router (p62015) and other dependencies request (but they have non-overlapping ranges!).

➤ YN0002: │ web@workspace:web doesn’t provide graphql (pc345c), requested by @redwoodjs/forms.

➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code.

➤ YN0000: └ Completed

➤ YN0000: ┌ Fetch step

➤ YN0013: │ 1940 packages were added to the project (+ 352.76 MiB).

➤ YN0000: └ Completed in 17s 702ms

➤ YN0000: ┌ Link step

➤ YN0007: │ core-js@npm:3.33.2 must be built because it never has been before or the last one failed

➤ YN0007: │ core-js-pure@npm:3.33.2 must be built because it never has been before or the last one failed

➤ YN0007: │ esbuild@npm:0.18.19 must be built because it never has been before or the last one failed

➤ YN0007: │ msw@npm:1.3.2 [114c5] must be built because it never has been before or the last one failed

➤ YN0007: │ fsevents@patch:fsevents@npm%3A1.2.13#optional!builtin<compat/fsevents>::version=1.2.13&hash=d11327 must be built because it never has been before or the last one failed

➤ YN0007: │ @prisma/client@npm:5.6.0 [78cce] must be built because it never has been before or the last one failed

➤ YN0007: │ esbuild@npm:0.18.20 must be built because it never has been before or the last one failed

➤ YN0007: │ @prisma/engines@npm:5.6.0 must be built because it never has been before or the last one failed

➤ YN0007: │ prisma@npm:5.6.0 must be built because it never has been before or the last one failed

➤ YN0000: └ Completed in 10s 562ms

➤ YN0000: · Done with warnings in 40s 659ms

Running the suggested command yarn explain peer-requirements d11327 yields further horror:

Usage Error: Invalid value for hash: expected to match the pattern /^p[0-9a-f]{5}$/ (got “d11327”)

$ yarn explain peer-requirements

running yarn redwood dev yields:

Generating the Prisma client…
api | Internal Error: fsevents@patch:fsevents@npm%3A~2.3.2#~builtin<compat/fsevents>: This package doesn’t seem to be present in your lockfile; run “yarn install” to update the lockfile
api | at X0.getCandidates (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:436:5149)
api | at Rf.getCandidates (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:392:1264)
api | at /redwoodblog/.yarn/releases/yarn-3.7.0.cjs:440:8033
api | at Cf (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:391:11070)
api | at ue (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:440:8013)
web | Internal Error: fsevents@patch:fsevents@npm%3A~2.3.2#~builtin<compat/fsevents>: This package doesn’t seem to be present in your lockfile; run “yarn install” to update the lockfile
web | at X0.getCandidates (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:436:5149)
web | at Rf.getCandidates (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:392:1264)
web | at /redwoodblog/.yarn/releases/yarn-3.7.0.cjs:440:8033
web | at Cf (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:391:11070)
web | at ue (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:440:8013)
gen | Internal Error: fsevents@patch:fsevents@npm%3A~2.3.2#~builtin<compat/fsevents>: This package doesn’t seem to be present in your lockfile; run “yarn install” to update the lockfile
gen | at X0.getCandidates (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:436:5149)
gen | at Rf.getCandidates (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:392:1264)
gen | at /redwoodblog/.yarn/releases/yarn-3.7.0.cjs:440:8033
gen | at Cf (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:391:11070)
gen | at ue (/redwoodblog/.yarn/releases/yarn-3.7.0.cjs:440:8013)
web | yarn cross-env NODE_ENV=development rw-vite-dev exited with code 1
api | yarn cross-env NODE_ENV=development NODE_OPTIONS=–enable-source-maps yarn nodemon --quiet --watch “/redwoodblog/redwood.toml” --exec “yarn rw-api-server-watch --port 8911 --debug-port 18911 | rw-log-formatter” exited with code 1
gen | yarn rw-gen-watch exited with code 1

Hey @ed-snodgrass, cool to hear about the project, sorry you’ve hit an early bump. I can’t quite reproduce yet. Here’s what I tried:

yarn create redwood-app --ts ./redwoodblog
cd redwoodblog
yarn install
yarn rw dev

You’re right about the tutorial missing the yarn install step. Just double checking because you didn’t list it in the three steps you took, you cded into the redwoodblog directory before running yarn install right?

The yarn version in your project (4.0.2?) seems odd—the project should’ve shipped with a yarn binary. In my project I have:

redwoodblog % yarn --version
3.7.0

(Globally I have yarn 4.0.2 (I did corepack enable then corepack prepare yarn@stable --activate), but the global version shouldn’t matter.)

Re the peer dependencies, a lot of horror there for sure, but if you can suspend judgement it’s nothing to worry about.

The output from yarn rw dev seems like you didn’t run yarn install. Does running yarn install in the redwoodblog directory fix it? Between the yarn version and that error, it feels like you may have just forgotten to cd? Let me know thanks!

Thank you @dom for the reply.

I definitely ran yarn install. This could be a yarn bug. I have an older MBP that still had yarn 1.x on it so I tried the install there and it worked fine.

Switching back to my newer MBP, I uninstalled yarn globally. And tried to install specifying the version v1.22.19 based on the “stable” version on the yarn installation page (although they’re trying to get folks to move beyond v1). At any rate, even specifying the version npm i -g yarn@1.22.19 I still got v4.0.2. . After more googling I removed the yarnPath line from the ~/.yarnrc.yml file and finally 1.22.19 was installed and the steps outlined in the tutorial worked.

I’m excited to move on from this step and dig into all things redwoodjs.

1 Like

@ed-snodgrass Great to hear that you got it working :tada:

But just to confirm, when you were still on yarn v4, did you do

yarn create redwood-app --ts ./redwoodblog
yarn install
cd redwoodblog
yarn redwood dev

or did you do

yarn create redwood-app --ts ./redwoodblog
cd redwoodblog
yarn install
yarn redwood dev

Basically, did you cd before or after yarn install?

@Tobbe ,

I was in the redwoodblog directory when I ran the yarn install command. I tried it a number of times. Did you happen to try this with yarn v4?

Interesting. I could actually reproduce this error.

@ed-snodgrass I submitted an issue over at GitHub: [Bug]: `yarn rw dev` fails on yarn 4 node 20 · Issue #9578 · redwoodjs/redwood · GitHub

Let’s continue there.