a year ago
I get a lot of these meaningless build errors when compiling static pages for my nextjs frontend on railway. Never happens in my local environment. Always goes away eventually if I keep spamming redeploy on my instance. Usually the pipeline will go green between 2nd and 4th re-attempts. I'm wondering if this happens because railway is aggressively caching something it shouldn't such as .next or .node_moudles etc. In my experience putting in extra null safety or type safety doesn't help.
ⓘ Deployment information is only viewable by project members and Railway employees.
7 Replies
a year ago
Hello,
Can you try to disable cache, set a service variable NIXPACKS_NO_CACHE to 1
Status changed to Awaiting User Response Railway • over 1 year ago
a year ago
This was a good suggestion, but alas it hasn't fixed the issue. In fact I think that makes it always fail, but not sure.
Status changed to Awaiting Railway Response Railway • over 1 year ago
a year ago
It looks like your project is building successfully now. Did you make any changes?
Status changed to Awaiting User Response Railway • over 1 year ago
a year ago
No changes Christian. This is a flaky bug. It always builds successfully if you spam redeploy.
Status changed to Awaiting Railway Response Railway • over 1 year ago
a year ago
Looks like you have sinced removed the variable?
Either way, at this point I would have to recommend moving to a Dockerfile based build, with a Dockerfile you can write it up so that it best mimics your local environment since you said you aren't having issues there.
Status changed to Awaiting User Response Railway • over 1 year ago
a year ago
Yeah I suppose I will just dockerize. I'll add that to the tech debt backlog, and come to it again in 2026.
Status changed to Awaiting Railway Response Railway • over 1 year ago
Status changed to Awaiting User Response Railway • over 1 year ago
7 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 7 months ago