Help [no longer] needed with baremetal deploy

I am trying to use the baremetal deploy

(I got the below error, then ran yarn rw upgrade [no change] then rebuilt my node_modules [no change] – don’t know what to try next)

yarn rw deploy baremetal production --first-run

and got this error

      class Request extends OriginalRequest {

TypeError: Class extends value undefined is not a constructor or null
    at createNodePonyfill (/[...]/Development/print-on-demand-2/node_modules/@whatwg-node/fetch/dist/create-node-ponyfill.js:163:29)
    at Object.<anonymous> (/[...]/Development/print-on-demand-2/node_modules/@whatwg-node/fetch/dist/node-ponyfill.js:3:19)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/[...]/Development/print-on-demand-2/node_modules/@graphql-yoga/common/cjs/server.js:10:47)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)

You have already rebuilt node_modules, so you have deleted/reinstalled them… Two more things I can think of to check:

  1. I see the first run flag, but if you have any old deploys delete them all and try again.
  2. Check your node version to see if its matching.

I was also going to suggest checking your node version. There’s some kind of problem with RW on Node18 on Linux that we haven’t been able to track down yet. Could that be the problem here?

You can always try manually cloning the code on the server and trying to get to run by hand. If that works, there’s no reason why it shouldn’t with Baremetal running the same commands on your behalf.

Make sure you’re not getting caught in the weird world where the ssh session that’s connected is a non-interactive shell, which won’t load ENV vars and other setup that you get when you log in normally via ssh. This has tripped some people up. There’s a note about it in the docs. Check the big warning block in this section: Introduction to Baremetal | RedwoodJS Docs

I was in the weird world of my memory – I can’t use BM for this project !!

I have to use docker-compose up


conversation on that error as moved here: [Bug?]: yarn create redwood-app fails on node 16.17.0 LTS · Issue #6338 · redwoodjs/redwood · GitHub