NEAR-Edu / near-certification-tools

2 stars 2 forks source link

The engine "node" is incompatible with this module. Expected version ">=17.8.0". Got "14.17.0" #57

Closed ryancwalsh closed 2 years ago

ryancwalsh commented 2 years ago

At https://dashboard.render.com/web/srv-c821j246fj315u4tlj90/deploys/dep-c9omk6irrk01uqgjkcag I see:

May 3 01:47:00 PM  Done in 27.00s.
May 3 01:47:17 PM  ==> Uploading build...
May 3 01:47:28 PM  ==> Build successful 🎉
May 3 01:47:28 PM  ==> Deploying...
May 3 01:48:25 PM  ==> Starting service with 'cd web-app; yarn start'
May 3 01:48:25 PM  yarn run v1.22.5
May 3 01:48:26 PM  error nextplus@0.1.0: The engine "node" is incompatible with this module. Expected version ">=17.8.0". Got "14.17.0"
May 3 01:48:26 PM  error Commands cannot run with an incompatible environment.
May 3 01:48:26 PM  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I remember https://github.com/NEAR-Edu/near-certification-tools/issues/44

I don't know what is causing it to try to run 14.17.0.

ryancwalsh commented 2 years ago

I added nvm use 17; to the build command at https://dashboard.render.com/web/srv-c821j246fj315u4tlj90/settings

But then the next deployment said May 3 03:43:43 PM bash: nvm: command not found.

Ahhh, I just found https://render.com/docs/node-version

That doesn't explain why this suddenly started being a problem, though, or why it's suddenly ignoring our package.json.

I'll go ahead and try adding an env var anyway: NODE_VERSION=17.8.0

ryancwalsh commented 2 years ago

Funnily enough, the prior deployment succeeded even before I added that NODE_VERSION=17.8.0, and then this deployment succeeded too.

I'll go ahead and close this issue even though I haven't diagnosed why there was a problem to begin with.

encody commented 2 years ago

Looks like it failed after trying to rebuild after this commit fb3e8dc612f2782e69528b35953efae0288b5ea6, which is weird since that commit didn't even change anything that would've affected the web app side of things.

ryancwalsh commented 2 years ago

@encody Yeah I know; that's the first place I looked but I didn't see anything suspicious. It's bizarre.