3 months ago
I'm having an issue where Next.js requires Node.js version 20 or later to build. My project uses Bun, so Railpack defaults to: bun │ 1.2.23 │ RAILPACK_BUN_VERSION (1.2.23)
I would like to specify which Node.js version Railpack should use for building.
I added the following environment variables in my .env file, but it seems that Railpack ignores the Node.js version setting:
RAILPACK_NODE_VERSION=22
RAILPACK_BUN_VERSION=1.2.23Question: How can I configure Railpack to install and use a specific Node.js version while still using Bun (for example, Node 22 with Bun 1.2.23)?
8 Replies
Hi there! So, you have to set the node version in railway variables for the service to use it, not the .env file.
https://railpack.com/languages/node#detection
here you have also other ways you can set up those versions, included bun
The easiest way is to add it directly in environment variables from the service
Got it working using this:
mise.toml
[tools]
node = "20.9.0"but MISE_NODE_VERSION=20.9.0 worked too.
Status changed to Solved noahd • 3 months ago
