R
Railway5mo ago
gustav

Nodejs 20 not set in railway

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"
27 Replies
Percy
Percy5mo ago
Project ID: 8bd8efef-3533-45db-9b74-4e2772fc4d44
gustav
gustav5mo ago
8bd8efef-3533-45db-9b74-4e2772fc4d44
Brody
Brody5mo ago
maybe you have 18 in an .nvmrc file?
gustav
gustav5mo ago
i don't have a .nvmrc file in my project
Brody
Brody5mo ago
gotcha, can you send a screenshot of the build table at the top of the build logs?
gustav
gustav5mo ago
Thank you for helping. This?
No description
Brody
Brody5mo ago
well yes but can i see the actual logs please, the build table at the of the log lines
gustav
gustav5mo ago
No description
Brody
Brody5mo ago
top of the logs please
gustav
gustav5mo ago
No description
Brody
Brody5mo ago
can you share your repo, there is some strange stuff going on with that table
gustav
gustav5mo ago
No description
gustav
gustav5mo ago
can I share it with your github acc. ?
Brody
Brody5mo ago
delete that file, you theoretically don't need it
gustav
gustav5mo ago
okay, I will try to push again
gustav
gustav5mo ago
now the table cahnged in the top:
No description
gustav
gustav5mo ago
thank you it managed to build now
Brody
Brody5mo ago
awesome, do you use npm or yarn locally?
gustav
gustav5mo ago
yarn how can I make it use yarn?
Brody
Brody5mo ago
do you have a yarn lock file?
gustav
gustav5mo ago
yes
Brody
Brody5mo ago
do you have a package lock file?
gustav
gustav5mo ago
yes
Brody
Brody5mo ago
then delete the package lock file, that's an npm thing
gustav
gustav5mo ago
yes
Brody
Brody5mo ago
once deleted the build on railway should use yarn
gustav
gustav5mo ago
okay, will try, thank you