Nixpacks is not using the correct node version
https://railway.app/project/8f1d8cfc-373d-4189-9320-7a799917bd63/service/95ed3ad8-09bd-4f34-8f2f-dc61bb1275cc?id=9066485d-e564-49bd-aa60-1328a349d472
Simply put, my env is using
NIXPACKS_NODE_VERSION=18
and NIXPACKS_NO_CACHE=1
yet I get an incompatible node version error saying I'm running node 16? Not sure what else I can do considering this was working literally yesterdayRailway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
23 Replies
Project ID:
8f1d8cfc-373d-4189-9320-7a799917bd63,95ed3ad8-09bd-4f34-8f2f-dc61bb1275cc,9066485d-e564-49bd-aa60-1328a349d472
That's super weird 🤔
does it work if you set the node version in your
package.json
?Nope, tried that too
"engines": {"node": ">=18.0.0"}
still only uses 16
Dang, well I'm out of ideas then
perhaps someone else has an idea..
Hopefully. Especially weird considering nixpacks says 18 is the default version anyway so not even sure why I had to try any of this in the first place haha
yea ðŸ˜
any insight into this? It's really hindering my team's progress
build logs please https://bookmarklets.up.railway.app/log-downloader/
I'll upload shortly, currently afk.
This also occurs on different environments that don't have the extra config too
but the error doesnt make sense as default node is 18, engines.node is 18, and NIXPACKS_NODE_VERSION is 18
You're building a node 16 environment 🤨
yeah, that's the issue
im telling it to use node 18
on NIXPACKS_NODE_VERSION and engines.node
yet it is entirely ignoring it
and nixpacks should use v18 by default, so not sure why this is using 16
:(
Solution
I think it's ignoring it because you specified your own dockerfile
and your own dockerfile states that it should build from node 16
oh my god yeah you're right
i feel so stupid
because before railway didnt seem to have support for react apps using react router
not sure if it does now?
it would 404 on redirect so now i have a custom dockerfile that runs an nginx server redirecting all to
/index.html
not sure if it does now?nope, this is by design, railway was not designed as a frontend host, it is up to the user to provide railway with a build that will properly run the frontend (like you do with the dockerfile)
cool cool that's fine
just was making sure what i was doing wasn't redundant
you can always get nixpacks to produce an image that serves spa csr apps
https://github.com/brody192/create-react-app-starter/blob/main/nixpacks.toml
Oh thanks!
will take a look instead of using custom dockerfile
But cool. Feel free to close this ticket :D
just right click and "mark as solution"
to whatever message contains the solution you wanted