InsideMeter (Node.js + React) deploys successfully on Railway but serves a blank page

samir-lal
PRO

14 days ago

Expected Behavior:
The full-stack Vite + Express app should serve both API and frontend from the same deployment.

Actual Behavior:

  • Build completes with no errors

  • Node server starts normally (node dist/index.js)

  • API routes return JSON as expected

  • Frontend renders blank white page (no 404s, just empty content)

Root Cause :
Static assets built into dist/public/ aren't accessible at runtime. Express looks for them in server/public/, leading to missing index.html and a blank screen.

Attempted Fixes:

  • Updated .railwayignore to avoid triggering Caddy

  • Tried various nixpacks.toml formats

  • Added Procfile (ignored by Nixpacks)

  • Set providers explicitly

  • Debugged with logging and build commands

Ask for Railway Support:

  • Is there a recommended way to handle this file mismatch?

  • Should we add a custom cp step to move Vite’s build output to server/public/?

  • Or can Railway's build phase be configured to detect and handle this automatically?

$10 Bounty

2 Replies

Railway
BOT

14 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Yep, your best bet is to copy vites build output to server/public. Shouldnt have any issues.