7 months ago
Anyone know how to set the RAILPACKNODEVERSION? I tried as a service variable but it didn't seem to have an effect. Oops, Node v18.19.0 detected even thought I set the version to 22. This is for a service that Railpack detects as bun@1.2.17.
16 Replies
7 months ago
Maybe you have it set as node 18 in your package.json engine field?
7 months ago
interesting <:Thinking:1360710341239242762>
7 months ago
well it defaults to node 22 regardless so it must be overwritten somewhere, also make sure a .nvmrc file isn't overwriting it
Don't have a .nvmrc. Hmm, it defaults to Node 22 even for the bun-specific Railpack?
https://railpack.com/languages/node
When using Node it says defaults to 22 but when using Bun it doesn't list a Node version default.
When Node.js isn’t required in the final image but is needed during installation (for native modules), a basic Node.js version will be installed from apt packages.
The build logs show this occurring.
Is there a way to install a higher version of Node when using a Bun-based Railpack?
7 months ago
I'm not sure, at the very least the docs dont state otherwise it only says Node 22 is the default
7 months ago
Perhaps it'd be worthwhile creating a Dockerfile for your app <:Thinking:1360710341239242762>
Railpack mentions If any script in your package.json contains node it will install Node so I added: "donotuse": "node --version" (absolutely horrible, I know)
The build logs show: node │ 20.19.3 │ package.json > engines > node (>=20.0.0)
Seems like it worked as a workaround to get a higher version of Node installed.
7 months ago
oh neat, thanks for sharing
7 months ago
well not perfect
Some creativity. not perfect indeed. hope someone else can benefit with this esoteric knowledge, glad to share!
Thanks for your help!
7 months ago
This is an interesting use case. We should respect the RAILPACK_NODE_VERSION variable when installing node when using it for Bun.
Status changed to Solved dev • 7 months ago






