Skip to content

Fix: Ensure correct Dockerfile is used for frontend build#2

Open
railway-app[bot] wants to merge 1 commit into
mainfrom
railway/code-change-avOlcg
Open

Fix: Ensure correct Dockerfile is used for frontend build#2
railway-app[bot] wants to merge 1 commit into
mainfrom
railway/code-change-avOlcg

Conversation

@railway-app
Copy link
Copy Markdown

@railway-app railway-app Bot commented Apr 4, 2026

Problem

Railway's auto-detection ignores the existing frontend/Dockerfile (which uses node:22-bookworm-slim) and generates its own Dockerfile using Node.js 18. This causes the build to fail with SyntaxError: The requested module 'node:util' does not provide an export named 'styleText' because rolldown-vite requires Node.js 20.19+ or 22.12+.

Solution

Added frontend/railway.toml with [build] dockerfilePath = "Dockerfile". Since the service root directory is already set to /frontend, this resolves to the correct frontend/Dockerfile and prevents Railway from falling back to its auto-generated Node.js 18 image.

Changes

  • Created frontend/railway.toml

Generated by Railway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants