#Nodejs 20 not set in railway

29 messages · Page 1 of 1 (latest)

serene ridge
#

I have set in my package.json:

"engines" : {
"node": "20"
}

and the I have set the NIXPACKS_NODE_VERSION=20 in my environment variables, but still my build fails with:

The engine "node" is incompatible with this module. Expected version "20". Got "18.18.2"

crystal questBOT
#

Project ID: 8bd8efef-3533-45db-9b74-4e2772fc4d44

buoyant veldtBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

serene ridge
#

8bd8efef-3533-45db-9b74-4e2772fc4d44

normal vine
#

maybe you have 18 in an .nvmrc file?

serene ridge
#

i don't have a .nvmrc file in my project

normal vine
#

gotcha, can you send a screenshot of the build table at the top of the build logs?

serene ridge
#

Thank you for helping. This?

normal vine
#

well yes but can i see the actual logs please, the build table at the of the log lines

serene ridge
normal vine
#

top of the logs please

serene ridge
normal vine
#

can you share your repo, there is some strange stuff going on with that table

serene ridge
#

can I share it with your github acc. ?

normal vine
#

delete that file, you theoretically don't need it

serene ridge
#

okay, I will try to push again

#

now the table cahnged in the top:

#

thank you it managed to build now

normal vine
#

awesome, do you use npm or yarn locally?

serene ridge
#

yarn

#

how can I make it use yarn?

normal vine
#

do you have a yarn lock file?

serene ridge
#

yes

normal vine
#

do you have a package lock file?

serene ridge
#

yes

normal vine
#

then delete the package lock file, that's an npm thing

serene ridge
#

yes

normal vine
#

once deleted the build on railway should use yarn