15 days ago
We are unable to deploy nextjs app, its under web folder of a monorepo.
2 Replies
15 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!
15 days ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 15 days ago
15 days ago
Tell Railway to use
web/
as your app root
In your Railway project → Settings → Deployment → Root Directory, set:Set your Build & Start commands
Still under Deployment, update:Build Command: npm install && npm run build Start Command: npm run start
Ensure your
web/package.json
has the right scripts{ "scripts": { "build": "next build", "start": "next start" } }
(Railway will run those from inside
web/
, so it will findpackage.json
and produce the.next
folder.)Redeploy
Hit Deploy (or push a dummy commit). You should see› Building… › Production build in .next ready › Starting…
and your app will go live.
That’s it—no extra Dockerfiles or hacks. Railway will look under web/
, run npm run build
, generate .next
, then npm run start
.