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