10 months ago
Issue
I cannot set the Node version that Svelte 5 needs.
I see the package.json can tell Railway what version they pick in this forum so i set:
package.json:
{
"name": "myapp",
"private": true,
"version": "0.0.1",
"type": "module",
"engines": {
"node": "20.19.0"
}
}Logs
Build fails with this log:
npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: myapp
npm error notsup Not compatible with your version of node/npm: myapp
npm error notsup Required: {"node":"20.19.0"}
npm error notsup Actual: {"npm":"10.8.2","node":"v20.18.1"}Also another log after i set engines.node as "^20.18.1":
npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: @sveltejs/vite-plugin-svelte@6.1.0
npm error notsup Not compatible with your version of node/npm: @sveltejs/vite-plugin-svelte@6.1.0
npm error notsup Required: {"node":"^20.19 || ^22.12 || >=24"}
npm error notsup Actual: {"npm":"10.8.2","node":"v20.18.1"}Any LLM could not solve this like 30 minutes battle...
And nothing changes if i set engines.node as "^20.19.0" or "24" or "^24" etc.. Railway always ignore these.
I know Docker works here but i am not familiar at all.
So tell me if I can without Docker.
Pinned Solution
10 months ago
Here’s how I fixed it—no Docker needed, just switch off Nixpacks and let Railpack respect the exact patch version:
- Flip the builder to Railpack
In your Railway project → Settings → Deployment → Builder, change from
nixpacksto:
railpack Railpack will honor your engines.node setting; Nixpacks only ever uses the major version.
2. Pin the exact Node version in package.json
At the top level of package.json, add:
{ "engines": { "node": "20.19.0" } } (Or whatever exact patch Svelte 5 requires.)
3. Redeploy
Just hit Deploy (or push a dummy commit) and you’ll see Railpack installing Node v20.19.0 instead of falling back to v20.18.1
4 Replies
10 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 node version error
- 🧵 Build error - The engine "node" is incompatible with this module.
- 🧵 Angular 20 Node version for Nixpacks
- 🧵 Node version error
If you find the answer from one of these, please let us know by solving the thread!
10 months ago
It is not resolved but Render.com follows package engines.node value and deploy successfully.
and they have mani options to do this.
like this:
https://render.com/docs/node-version
Pls Railway support this. maybe Railway reject minor version of node though i dont know why.
10 months ago
Here’s how I fixed it—no Docker needed, just switch off Nixpacks and let Railpack respect the exact patch version:
- Flip the builder to Railpack
In your Railway project → Settings → Deployment → Builder, change from
nixpacksto:
railpack Railpack will honor your engines.node setting; Nixpacks only ever uses the major version.
2. Pin the exact Node version in package.json
At the top level of package.json, add:
{ "engines": { "node": "20.19.0" } } (Or whatever exact patch Svelte 5 requires.)
3. Redeploy
Just hit Deploy (or push a dummy commit) and you’ll see Railpack installing Node v20.19.0 instead of falling back to v20.18.1
Status changed to Solved brody • 10 months ago
loganbek
Here’s how I fixed it—no Docker needed, just switch off Nixpacks and let Railpack respect the exact patch version: 1. **Flip the builder to Railpack** In your Railway project → **Settings** → **Deployment** → **Builder**, change from `nixpacks` to: ``` railpack ``` Railpack will honor your `engines.node` setting; Nixpacks only ever uses the **major** version. 2. **Pin the exact Node version in** `package.json` At the top level of `package.json`, add: ``` { "engines": { "node": "20.19.0" } } ``` (Or whatever exact patch Svelte 5 requires.) 3. **Redeploy** Just hit **Deploy** (or push a dummy commit) and you’ll see Railpack installing Node v20.19.0 instead of falling back to v20.18.1
10 months ago
It worked!
I did not know Railpack and it respect the exact patch version of Node.
Thank you so much.
how-to screenshot:
Status changed to Awaiting Railway Response Railway • 10 months ago
Status changed to Solved brody • 10 months ago

