You are being asked for an architectural second opinion. No code changes — read-only…
- User
You are being asked for an architectural second opinion. No code changes — read-only analysis, opinionated conclusion.
Context
Working directory: /Users/user_c042661f/Documents/reigh-workspace/reigh-app This is a React + Vite app deployed to Railway via Nixpacks.
The chase that just happened
Over the last hour, deploys to Railway have been failing repeatedly. Here's the chronology:
- Initial symptom:
npm WARN EBADENGINEfor packages requiring Node^20.19.0 || >=22.12.0, ours was20.6.1(because nixpacksnodejs_20derivation in the pinned image snapshot resolves to 20.6.1 — an old patch). - Attempt 1: Set
nixPkgs = ["nodejs_22", "openssl"]innixpacks.toml. Failed:nodejs_22not in the pinned snapshot. - Attempt 2: Removed
nodejs_*fromnixPkgs, keptopenssl. Failed:npm: command not found— nixpacks didn't install Node at all. - Attempt 3: Removed
[phases.setup]entirely. Failed: samenpm: command not found. - Attempt 4: Added
[environments.production.variables] NIXPACKS_NODE_VERSION = "20"torailway.toml. Failed: variables inrailway.tomldo NOT propagate to nixpacks builds — only Dashboard-set env vars do. - Reverted to baseline:
nixPkgs = ["nodejs_20", "openssl"]. Build succeeds, but EBADENGINE warnings remain. - User then sets
NIXPACKS_NODE_VERSION=20in Railway Dashboard (which causes nixpacks to use fnm to download a fresh Node 20.x, overriding the snapshot). - New failure: build daemon returns
process "/bin/bash -ol pipefail -c npm ci" did not complete successfully: exit code: 1. Different error from before — now npm IS installed (via fnm) butnpm ciitself fails.
Current files
nixpacks.toml:code[phases.setup] nixPkgs = ["nodejs_20", "openssl"] [phases.install] cmds = ["npm ci"] [phases.build] cmds = ["npm run build"] [start] cmd = "npm run serve"railway.toml:code - Initial symptom:
- Assistant
I’ll verify the repo’s current version signals and deploy config, then I’ll give the architectural read without changing anything.
- Assistant
I found one important correction:
package.jsondoes haveengines.node, but it says>=20.9.0, which is looser than the dependency warning you saw (^20.19.0 || >=22.12.0). I’m checking the lockfile for the actual package constraints so the recommendation is grounded. - Assistant