2 months ago
Strapi template inside Railway is a bust. everytime.
You reached the start of the range
2026-08-28 18:33
unpacking archive
530 KB
7ms
scheduling build on Metal builder "builder-hqexto"
uploading snapshot
200 KB
23ms
using build driver railpack-v0.38.0
local://prepare-driver
0ms
local://prepare-context
0ms
prepare railpack-v0.38.0
2s
╭─────────────────╮
│ Railpack 0.38.0 │
╰─────────────────╯
↳ Detected Node
↳ Using yarn1 package manager
↳ Custom start command detected, skipping Caddy start
Packages
──────────
node │ 22.23.2 │ package.json > engines > node (>=22.x.x)
yarn │ 1.22.22 │ railpack default (1)
Steps
──────────
▸ install
$ yarn install --frozen-lockfile▸ build
$ yarn run buildDeploy
──────────
$ yarn run startload build definition from ./railpack-plan.json
0ms
install apt packages: libatomic1
4s
Processing triggers for libc-bin (2.41-12+deb13u3) ...
install apt packages: gpg tar
6s
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
install mise packages: node, yarn
2s
mise node@22.23.2 ✓ installed
mkdir -p /app/node_modules/.cache
365ms
copy package.json, yarn.lock, /mise/shims
245ms
yarn install --frozen-lockfile
32s
Done in 29.86s.
copy /mise/installs, /usr/local/bin/mise, /etc/mise/config.toml, /root/.local/state/mise, / /app
32s
yarn run build
2s
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Build Failed: build daemon returned an error < failed to solve: process "yarn run build" did not complete successfully: exit code: 1 >
2 Replies
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 2 months ago
2 months ago
The log here cuts off right where the actual error would be — yarn run build exit code 1 alone doesn't tell us why, the real reason is the stderr output right above the "Build Failed" line. Could you expand/scroll up in the build logs and paste the actual webpack/Strapi error text? That'll make this a lot faster to pin down.
In the meantime, the two most common causes of Strapi builds failing at this exact step on Railway:
Missing required Strapi secrets at build time — Strapi's admin panel build step often needs APP_KEYS, API_TOKEN_SALT, ADMIN_JWT_SECRET, TRANSFER_TOKEN_SALT, and JWT_SECRET set as env vars even during build, not just at runtime. If the template didn't auto-generate these (or they got wiped), the build step can fail. Worth checking your service's Variables tab for all five.
Node version mismatch — your log shows Node 22.23.2 being installed. Strapi (especially v4) has fairly strict engines requirements and some versions don't officially support Node 22 yet — if your package.json doesn't pin a supported Node range, Railpack may be grabbing a newer Node than Strapi's build tooling actually supports. Worth checking what Strapi version the template uses and whether it lists Node 22 as supported; if not, pinning "engines": {"node": "18.x"} or "20.x" in package.json is the fix.
a month ago
I don't think Node 22 is the problem here.. the template itself is explicitly asking Railpack for >= 22.x.x, and Railpack is correctly installing 22.23.2
The useful error is missing from this log! It jumps straight from:
yarn run buildto:
Build Failed: build daemon returned an errorCould you open that build step and paste the output from yarn run build itself?
exit code: 1 doesn't show what Strapi actually failed on. Since this is the Railway Strapi template failing out of the box, that output should be enough to tell whether it's the template or the deployment config..