How do you properly set the node version that you want?
In my package.json, I have:
but when I do a build in railway, I see:
According to Nixpacks docs here: https://nixpacks.com/docs/providers/node
The node version should have been overridden by my
engines.node
?
The docs also say that 18
should be default, but I see 16x
used in railway.
Where is the disconnect here?Node | Nixpacks
App source + Nix packages + Docker = Image
25 Replies
Project ID:
N/A
N/A
do you have a
NIXPACKS_NODE_VERSION
variable?I do not,
here is my pid: 8839d035-4f03-41e7-b7ae-aa753f385754
something else that would set the node version? nvmrc file maybe
no, I usse
asdf-vm
on my local to set the node version for the project, and it has a .tool-version
and the contents of that file is:
Is there a way to know from the logs, where the node version is comfing from?
I do see this warn in the log:
probably the culpritits coming from something in your repo
share your repo?
its a private repo, so I can't really sahre it
I wonder why it says that node 20 is unsupported though, its supposed to be supported accorindg to nixpacks docs
maybe try just
20
what do you mean?
that's what it is
its not
I tried both.
and
I just tried
20.x
and I see:
something in your repo is setting node to 16
Does it have something to do with nixpacks version in railway? I notice its a older version
what version is it set to
well, from the logs I can see its: Nixpacks v1.15.0
but I'm not setting it anywhere myself
I also tried setting NIXPACKS_NODE_VERSION variable to
20.x
and it still doesn't work
keeps using v16 for some reasondont think nixpacks v1.15.0 supports node 20, but you would be setting that somewhere too, likely in a railway.json/toml
I tried setting it to 18, in my package.json file and see:
I can't be setting it to v16 in my code, otherwise I wouldn't show that warninig, or even say that 18 is not supported
^
should I be specifying a nixpacks version in railway.toml? or does it just use the latest by default?
you are specifying it somewhere already, thats why its not the latest
ok, checked railway.toml, looks like nixpacks version was there.
should I take it out, or just set it to the latest?
🤔
take it out
ok, let me try that n
now*
perfect, looks like that did the trick 🙂
thanks 🙏
no problem