Error map

next build: JavaScript heap out of memory Next.js: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (during next build)

Next.js · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

next build: JavaScript heap out of memory — Next.js: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (during next build) (Next.js)next build:…MaxListenersExceededWarning — MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 listeners added (Node.js)MaxListenersExceede…ELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEgyp ERR! — gyp ERR! build error / node-gyp rebuild failed (npm)gyp ERR!node-sass — Error: Node Sass does not yet support your current environment (Node.js)node-sassModule parse failed — Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type (React)Module parse failedPrerender error — Error occurred prerendering page "/x". Read more: https://nextjs.org/docs/messages/prerender-error (React)Prerender errorreact-scripts not found — 'react-scripts' is not recognized as an internal or external command / react-scripts: command not found (React)react-scripts not f…Container exceeded memory limit — Bitbucket Pipelines: Container 'Build' exceeded memory limit / Docker container exited with code 137 (CI/CD)Container exceeded …invalid string length — RangeError: Invalid string length (JavaScript)invalid string leng…prisma generate — Error: @prisma/client did not initialize yet. Please run "prisma generate" (Node.js)prisma generateProcess completed with exit code 137 — GitHub Actions: Error: Process completed with exit code 137 (Killed — out of memory) (CI/CD)Process completed w…heap out of memory — FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (Node.js)heap out of memoryOOMKilled — Kubernetes: OOMKilled (exit code 137) (Kubernetes)OOMKilledOutOfMemoryError — java.lang.OutOfMemoryError: Java heap space (Java)OutOfMemoryErrorMEMORY_MANAGEMENT — Blue Screen: MEMORY_MANAGEMENT (Stop code 0x0000001A) (Windows)MEMORY_MANAGEMENTEADDRINUSE — Error: listen EADDRINUSE: address already in use :::3000 (Node.js)EADDRINUSEGradle wrapper main class — Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain (Java)Gradle wrapper main…ERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPP…ModuleNotFoundError — ModuleNotFoundError: No module named 'x' (Python)ModuleNotFoundErrorNo Xcode or CLT — gyp: No Xcode or CLT version detected! (npm)No Xcode or CLTsharp module — Error: Could not load the "sharp" module using the linux-x64 runtime (npm)sharp moduleMODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDCOPY failed — COPY failed: file not found in build context / "/app/x": not found (Docker)COPY failedERR_PACKAGE_PATH_NOT_EXPORTED — Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports" (Node.js)ERR_PACKAGE_PATH_NO…ChunkLoadError — ChunkLoadError: Loading chunk 123 failed. (JavaScript)ChunkLoadErrorCan't resolve 'fs' — Module not found: Can't resolve 'fs' (Next.js / webpack 5) (React)Can't resolve 'fs'unknown instruction — Dockerfile parse error line N: unknown instruction (Docker)unknown instructionHydration failed — Error: Hydration failed because the initial UI does not match what was rendered on the server (React)Hydration failedneeds useState — You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client" (React)needs useStateDynamic server usage — Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `cookies` (React)Dynamic server usagecommand not found — bash: command not found (Linux)command not foundnpx executable — npm ERR! could not determine executable to run (npm)npx executablescript command not found — sh: vite: command not found (npm script) (npm)script command not …Cannot connect to the Docker daemon (GitLab) — GitLab CI: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running? (CI/CD)Cannot connect to t…Waiting for next available executor — Jenkins: Still waiting to schedule task — Waiting for next available executor / 'agent1' is offline (CI/CD)Waiting for next av…Too long with no output — CircleCI: Too long with no output (exceeded 10m0s): context deadline exceeded (CI/CD)Too long with no ou…SIGSEGV — Segmentation fault (core dumped) (Linux)SIGSEGVOOM killer — Killed / Out of memory: Killed process (Linux OOM killer) (Linux)OOM killerStringIndexOutOfBoundsException — java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5 (Java)StringIndexOutOfBou…Prisma P2002 — PrismaClientKnownRequestError P2002: Unique constraint failed on the fields: (`email`) (Node.js)Prisma P2002Prisma P1001 — Error: P1001: Can't reach database server at `host`:`5432` (Node.js)Prisma P1001lookup registry-1.docker.io: no such host — dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build (Docker)lookup registry-1.d…Process completed with exit code 1 — GitHub Actions: Error: Process completed with exit code 1. (CI/CD)Process completed w…Process completed with exit code 127 — GitHub Actions: Error: Process completed with exit code 127 — command not found (CI/CD)Process completed w…The runner has received a shutdown signal — GitHub Actions: The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled (CI/CD)The runner has rece…recovery mode — FATAL: the database system is in recovery mode (PostgreSQL)recovery modeMemoryError — MemoryError (Unable to allocate X GiB for an array) (Python)MemoryErrorJupyter kernel died — The kernel appears to have died. It will restart automatically. (Python)Jupyter kernel died

Directly related (12)

MaxListenersExceededWarningNode.js

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 listeners added

More than 10 listeners were added to one event — often a leak where listeners are added repeatedly.

ELIFECYCLEnpm

npm ERR! code ELIFECYCLE / Command failed with exit code 1

An npm script (build, start, test, postinstall) exited with an error. ELIFECYCLE is only the wrapper — the real error is printed…

gyp ERR!npm

gyp ERR! build error / node-gyp rebuild failed

A dependency with native C/C++ code couldn’t compile — missing build tools, Python, or an unsupported Node version.

node-sassNode.js

Error: Node Sass does not yet support your current environment

node-sass (deprecated) has no binary for your Node version/OS.

Module parse failedReact

Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type

Webpack found syntax it can’t parse because no loader is configured for that file (JSX, TypeScript, CSS, or modern syntax in node…

Prerender errorReact

Error occurred prerendering page "/x". Read more: https://nextjs.org/docs/messages/prerender-error

A page threw an error while Next.js was rendering it at build time.

react-scripts not foundReact

'react-scripts' is not recognized as an internal or external command / react-scripts: command not found

node_modules is missing or broken, so the react-scripts binary isn’t available.

Container exceeded memory limitCI/CD

Bitbucket Pipelines: Container 'Build' exceeded memory limit / Docker container exited with code 137

A Bitbucket Pipelines step used more memory than the step allows (4 GB by default, 1 GB for service containers) and was killed.

invalid string lengthJavaScript

RangeError: Invalid string length

A string grew beyond the engine’s maximum length — usually runaway concatenation or huge JSON.stringify output.

prisma generateNode.js

Error: @prisma/client did not initialize yet. Please run "prisma generate"

The generated Prisma Client is missing or out of date.

Process completed with exit code 137CI/CD

GitHub Actions: Error: Process completed with exit code 137 (Killed — out of memory)

The command was killed by the system with SIGKILL (128 + 9), almost always because the runner ran out of memory.

heap out of memoryNode.js

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

The V8 heap hit its limit — a large build (webpack, tsc, Next.js) needs more memory, or the app leaks.

Two steps away (36)

OOMKilledKubernetes

Kubernetes: OOMKilled (exit code 137)

The container used more memory than its limit, and the kernel killed it.

OutOfMemoryErrorJava

java.lang.OutOfMemoryError: Java heap space

The JVM ran out of heap memory and garbage collection couldn’t free enough.

MEMORY_MANAGEMENTWindows

Blue Screen: MEMORY_MANAGEMENT (Stop code 0x0000001A)

Windows detected a severe memory-management error — commonly faulty RAM, unstable memory settings or a bad driver.

EADDRINUSENode.js

Error: listen EADDRINUSE: address already in use :::3000

Another process is already listening on that port.

Gradle wrapper main classJava

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

The Gradle wrapper JAR (gradle/wrapper/gradle-wrapper.jar) is missing or corrupt.

ERR_OSSL_EVP_UNSUPPORTEDNode.js

Error: error:0308010C:digital envelope routines::unsupported

An old build tool (webpack 4, old react-scripts) uses a hash algorithm that OpenSSL 3 in Node 17+ disables.

ModuleNotFoundErrorPython

ModuleNotFoundError: No module named 'x'

Python can’t find the module you import — it isn’t installed in the interpreter/virtualenv that’s running, or the import path is…

No Xcode or CLTnpm

gyp: No Xcode or CLT version detected!

node-gyp on macOS can’t find the Xcode Command Line Tools to compile native modules.

sharp modulenpm

Error: Could not load the "sharp" module using the linux-x64 runtime

sharp’s native binary for this OS/CPU isn’t installed — usually node_modules installed on another platform (Mac → Linux/Docker).

MODULE_NOT_FOUNDNode.js

Error: Cannot find module 'x' (MODULE_NOT_FOUND)

Node can’t resolve the module path — the package isn’t installed, or a relative path/extension is wrong.

COPY failedDocker

COPY failed: file not found in build context / "/app/x": not found

The Dockerfile COPY refers to a path outside the build context, excluded by .dockerignore, or relative to the wrong directory.

ERR_PACKAGE_PATH_NOT_EXPORTEDNode.js

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports"

You imported a deep path inside a package that its package.json "exports" field doesn’t expose.

ChunkLoadErrorJavaScript

ChunkLoadError: Loading chunk 123 failed.

A lazily loaded JavaScript chunk couldn’t be downloaded — usually because a new deployment removed the old hashed files.

Can't resolve 'fs'React

Module not found: Can't resolve 'fs' (Next.js / webpack 5)

A Node.js built-in (fs, path, crypto, net) is imported into code that runs in the browser bundle.

unknown instructionDocker

Dockerfile parse error line N: unknown instruction

A line in the Dockerfile doesn’t start with a valid instruction — usually a broken line continuation or a typo.

Hydration failedReact

Error: Hydration failed because the initial UI does not match what was rendered on the server

The HTML rendered on the server differs from the first client render, so React (Next.js/Remix) can’t attach to it.

needs useStateReact

You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client"

In the Next.js App Router, a component using hooks or browser APIs is rendered as a Server Component.

Dynamic server usageReact

Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `cookies`

Next.js tried to statically render a route that reads request-specific data (cookies, headers, searchParams).

command not foundLinux

bash: command not found

The shell can’t find an executable with that name in any directory on your PATH.

npx executablenpm

npm ERR! could not determine executable to run

npx couldn’t find a binary to run for that package.

script command not foundnpm

sh: vite: command not found (npm script)

A tool used in an npm script isn’t installed in node_modules/.bin.

Cannot connect to the Docker daemon (GitLab)CI/CD

GitLab CI: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?

A docker-in-docker job could not reach the `docker:dind` service — it is not started, not privileged, or the TLS/host settings do…

Waiting for next available executorCI/CD

Jenkins: Still waiting to schedule task — Waiting for next available executor / 'agent1' is offline

A Jenkins build is queued because no executor with the required label is free or the agent is offline.

Too long with no outputCI/CD

CircleCI: Too long with no output (exceeded 10m0s): context deadline exceeded

A CircleCI step printed nothing for 10 minutes, so CircleCI assumed it hung and cancelled it.

SIGSEGVLinux

Segmentation fault (core dumped)

A program accessed memory it wasn’t allowed to, and the kernel killed it with SIGSEGV (exit code 139).

OOM killerLinux

Killed / Out of memory: Killed process (Linux OOM killer)

The kernel ran out of memory and killed a process to recover — the program just prints “Killed” (exit code 137).

StringIndexOutOfBoundsExceptionJava

java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5

substring()/charAt() used an index outside the string.

Prisma P2002Node.js

PrismaClientKnownRequestError P2002: Unique constraint failed on the fields: (`email`)

A Prisma create/update violated a unique constraint.

Prisma P1001Node.js

Error: P1001: Can't reach database server at `host`:`5432`

Prisma couldn’t connect to the database in DATABASE_URL.

lookup registry-1.docker.io: no such hostDocker

dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build

DNS isn’t working for the Docker daemon or inside build containers, so pulls and package downloads fail.

Process completed with exit code 1CI/CD

GitHub Actions: Error: Process completed with exit code 1.

A `run:` command returned a non-zero status, so the step (and job) failed — the real cause is printed in the log lines above.

Process completed with exit code 127CI/CD

GitHub Actions: Error: Process completed with exit code 127 — command not found

The shell could not find the command you tried to run: it is not installed on the runner, not on PATH, or misspelled.

The runner has received a shutdown signalCI/CD

GitHub Actions: The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled

The machine running your job was shut down or reclaimed while the job was running — a self-hosted runner stopped, a spot instance…

recovery modePostgreSQL

FATAL: the database system is in recovery mode

PostgreSQL crashed (often OOM-killed) and is replaying WAL to recover.

MemoryErrorPython

MemoryError (Unable to allocate X GiB for an array)

Python couldn’t allocate memory — the data is larger than available RAM or address space.

Jupyter kernel diedPython

The kernel appears to have died. It will restart automatically.

The Jupyter kernel process crashed — usually out of memory or a native library crash.