2 months ago
Hello! I'm facing an issue where Railpack isn't using my railway.json file for building my Next.js application (bun@1.3.10, node@22.22.1).
It's unusual because the build logs show that it successfully found my railway.config file. I've also manually set the config-as-code path to that file, but Railpack still doesn’t use it.
scheduling build on Metal builder "builder-hygbpz"
[snapshot] received sha256:62a885535e551f8bf5d44d76ba3026621752744c95c2966d2c7d192aefedcf92 md5:ca0dd667987230780e3939cf2fbffc96
receiving snapshot16.2 MB1.6s
root directory set as 'web'
config-as-code path set as '/web/railway.json'
skipping 'railway.json' at 'discord-bot/railway.json' as it is not rooted at a valid path (root_dir=web, fileOpts={acceptChildOfRepoRoot:true})
found config-as-code file at 'web/railway.json'
config-as-code path sanitized to 'web/railway.json'
╭─────────────────╮
│ Railpack 0.19.0 │
╰─────────────────╯
↳ Detected Node
↳ Using bun package manager
↳ Bun runtime detected
Packages
──────────
node │ 22.22.1 │ railpack default (22)
bun │ 1.3.10 │ railpack default (latest)
Steps
──────────
▸ install
$ bun install --frozen-lockfile
▸ build
$ bun run build
Deploy
──────────
$ bun run start
Here's my railway.json:
{
"$schema": "https://railway.com/railway.schema.json",
"build": {
"railpackVersion": "0.17.2",
"buildCommand": "bun prisma generate && bun run build:railway"
},
"deploy": {
"startCommand": "bun run start",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10,
"overlapSeconds": 60,
"drainingSeconds": 10,
"multiRegionConfig": {
"us-east4-eqdc4a": {
"numReplicas": 1
}
}
}
}My last successful deployment was last week and nothing about the config has changed between commits (besides specifying railpackVersion in an attempt to fix the issue to no success). My workaround for the time being is to turn off Metal Build Environment. Is anyone else facing this issue?
4 Replies
Status changed to Awaiting Railway Response Railway • 2 months ago
2 months ago
Can you please provide an example repo that we can deploy so we can observe this behavior?
Status changed to Awaiting User Response Railway • 2 months ago
brody
Can you please provide an example repo that we can deploy so we can observe this behavior?
2 months ago
Hi Brody, thanks for reaching out!
As requested, here's an example repo: https://github.com/ppongpeauk/railway-xcs-example
Please note that this project builds successfully since it doesn’t actively use libraries like Prisma. However, the config issue still persists.
Status changed to Awaiting Railway Response Railway • 2 months ago
2 months ago
This is a known issue where the Metal builder finds your config-as-code file but doesn't pass its settings (like buildCommand and railpackVersion) to Railpack. We're tracking it and working on a fix. Disabling Metal Build Environment is the correct workaround for now.
Status changed to Awaiting User Response Railway • 2 months ago
2 months ago
Thanks for the update. I look forward to the fix!
Status changed to Awaiting Railway Response Railway • 2 months ago
Status changed to Solved ppongpeauk • 2 months ago