Problem running dev server for redwoodjs.com

Not sure whether this goes here or in questions, sorry.

I’m trying to contribute to redwoodjs.com, so I forked the repo, cloned it on my machine, ran yarn install then yarn build then yarn dev and got:

... 

Error: Cannot find module 'fs/promises'
Require stack:
- /home/william/Desktop/Robobunny/redwoodjs/redwoodjs.com/lib/middleware/use-redirects.js
- /home/william/Desktop/Robobunny/redwoodjs/redwoodjs.com/node_modules/live-server/index.js
- /home/william/Desktop/Robobunny/redwoodjs/redwoodjs.com/node_modules/live-server/live-server.js

...

and if I run yarn netlify I get:

...

◈ No "targetPort" option specified or detected.
error Command failed with exit code 1.

...

My versions:

$ node -v
v12.18.3

$ yarn -v
1.22.4

$ npm -v
6.14.8

Is there something obvious I’m missing here?

Hi :wave: @robobunny.

I jot the same error using node 12.8.3:

Processing code/stylesheets/application.pcss...
internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module 'fs/promises'

I’d suggest using:

12.19

with an .nvmrc file and then calling nvm use and doing yarn and yarn build again.

12.19 is what Netlify is currently using unless you specify otherwise.

Also works with v14 (current).

1 Like

Brilliant. Thanks.
Best,
william