Flaky static pages build errors nextjs
occultus73
PROOP

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.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

7 Replies

brody
EMPLOYEE

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 about 1 year ago


occultus73
PROOP

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 about 1 year ago


It looks like your project is building successfully now. Did you make any changes?


Status changed to Awaiting User Response Railway about 1 year ago


occultus73
PROOP

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 about 1 year ago


brody
EMPLOYEE

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 about 1 year ago


occultus73
PROOP

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 about 1 year ago


brody
EMPLOYEE

a year ago

Haha sounds good, let me know if you need any help with the Dockerfile!


Status changed to Awaiting User Response Railway about 1 year ago


Railway
BOT

6 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 6 months ago


Loading...