Builds getting failing automatically -> script "build" was terminated by signal SIGABRT (Abort)
shreyaan-ai
PROOP

a month ago

Error message->

▲ Next.js 15.5.9

- Experiments (use with caution):

· serverActions

· clientTraceMetadata

Creating an optimized production build ...

memory allocation of 196608 bytes failed

error: script "build" was terminated by signal SIGABRT (Abort)

Solved

3 Replies

shreyaan-ai
PROOP

a month ago

builder

RUN cd apps/web && bun run build

2m 38s

$ next build

▲ Next.js 15.5.9

- Experiments (use with caution):

· serverActions

· clientTraceMetadata

Creating an optimized production build ...

memory allocation of 196608 bytes failed

error: script "build" was terminated by signal SIGABRT (Abort)

Dockerfile:32

-------------------

30 | ENV NEXT_TELEMETRY_DISABLED=1

31 | RUN cd apps/web && bun add @next/swc-linux-arm64-gnu --no-save

32 | >>> RUN cd apps/web && bun run build

33 |

34 | # Production image, copy all the files and run Next standalone server

-------------------

ERROR: failed to build: failed to solve: process "/bin/sh -c cd apps/web && bun run build" did not complete successfully: exit code: 139

This happens on all builds and is very annoying


Are you building in a monorepo? , If yes ,your dockerfile is probably installing all dependencies for the entire monorepo, not just the

frontend. That's eating all the memory during the Next.js build.Try adding a .dockerignore to exclude unnecessary packages, or use a multi-stage Dockerfile that only copies apps/web and its dependencies.


diana
PRO

25 days ago

Can you please advise if you are able to build locally or if this only happens on railway?


Status changed to Awaiting User Response Railway 25 days ago


Railway
BOT

18 days 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 18 days ago


Loading...