Error map

undefined reference to C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status

C/C++ · layer 4, Application & API

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.

undefined reference to — C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status (C/C++)undefined r…was not declared in this scope — C++: error: 'x' was not declared in this scope (undeclared identifier) (C/C++)was not declared in…undefined reference to main — C/C++: undefined reference to `main' — (.text+0x20) in crt1.o (C/C++)undefined reference…did not complete successfully — failed to solve: process "/bin/sh -c ..." did not complete successfully: exit code: 1 (Docker)did not complete su…undefined reference to pthread_create — C/C++: undefined reference to `pthread_create' — missing -pthread (also `dlopen`, `clock_gettime`) (C/C++)undefined reference…lookup 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…gyp 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-sassFailed building wheel — error: subprocess-exited-with-error / Failed building wheel for x (Python)Failed building whe…Module parse failed — Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type (React)Module parse failedCould not find a package configuration file — CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2) (C/C++)Could not find a pa…failed to read dockerfile — failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory (Docker)failed to read dock…double free or corruption — C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped) (C/C++)double free or corr…expected ';' before — C/C++: error: expected ';' before 'x' — missing semicolon (C/C++)expected ';' beforeexpected primary-expression before — C++: error: expected primary-expression before ')' token (C/C++)expected primary-ex…does not name a type — C++: error: 'string' does not name a type (C/C++)does not name a typefatal error: No such file or directory — C/C++: fatal error: foo.h: No such file or directory — #include not found (C/C++)fatal error: No suc…multiple definition of — C/C++: multiple definition of `x'; first defined here — ld returned 1 exit status (C/C++)multiple definition…undefined reference to vtable — C++: undefined reference to `vtable for X' — virtual function not defined (C/C++)undefined reference…COPY failed — COPY failed: file not found in build context / "/app/x": not found (Docker)COPY failedunknown instruction — Dockerfile parse error line N: unknown instruction (Docker)unknown instructionmax depth exceeded — Error response from daemon: max depth exceeded (too many image layers) (Docker)max depth exceedederror while loading shared libraries — error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory (Linux)error while loading…terminate called without an active exception — C++: terminate called without an active exception — std::thread destroyed while joinable (C/C++)terminate called wi…LNK1104 — MSVC: fatal error LNK1104: cannot open file 'foo.lib' (or 'app.exe' while it is running) (C/C++)LNK1104ECONNREFUSED — Error: connect ECONNREFUSED 127.0.0.1:5432 (Node.js)ECONNREFUSED408 — HTTP 408 Request Timeout (HTTP)408Failed to fetch — TypeError: Failed to fetch / NetworkError when attempting to fetch resource (JavaScript)Failed to fetchModuleNotFoundError — ModuleNotFoundError: No module named 'x' (Python)ModuleNotFoundErrorELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPP…MODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDERR_PACKAGE_PATH_NOT_EXPORTED — Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports" (Node.js)ERR_PACKAGE_PATH_NO…EBADENGINE — npm WARN EBADENGINE Unsupported engine / The engine "node" is incompatible with this module (Node.js)EBADENGINEGradle wrapper main class — Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain (Java)Gradle wrapper main…externally-managed-environment — error: externally-managed-environment (Python)externally-managed-…pip no matching distribution — ERROR: Could not find a version that satisfies the requirement x (from versions: none) (Python)pip no matching dis…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'Prerender error — Error occurred prerendering page "/x". Read more: https://nextjs.org/docs/messages/prerender-error (React)Prerender errorredefinition of — C++: error: redefinition of 'class X' / multiple definition — missing include guard (C/C++)redefinition ofnot a member of std — C++: error: 'optional' in namespace 'std' does not name a template type — wrong -std standard (C/C++)not a member of stdNo rule to make target — Make: *** No rule to make target 'foo.c', needed by 'foo.o'. Stop. (C/C++)No rule to make tar…forbidden path outside the build context — COPY failed: forbidden path outside the build context: ../file (Docker)forbidden path outs…Sending build context — Docker build slow: "Sending build context to Docker daemon 2.5GB" / transferring context takes forever (Docker)Sending build conte…Output directory not found — Cloudflare Pages build: Error: Output directory "dist" not found / Failed: build output directory not found (Cloudflare)Output directory no…OOMKilled — 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_MANAGEMENT

Directly related (12)

was not declared in this scopeC/C++

C++: error: 'x' was not declared in this scope (undeclared identifier)

The compiler met a name it has never seen: it is misspelled, declared later, out of scope, or its header or namespace is missing.

undefined reference to mainC/C++

C/C++: undefined reference to `main' — (.text+0x20) in crt1.o

The linker has no `main` function: the file with `main` is not compiled or linked, or `main` is spelled or declared incorrectly.

did not complete successfullyDocker

failed to solve: process "/bin/sh -c ..." did not complete successfully: exit code: 1

A RUN step in your Dockerfile failed. The real error is printed in the lines just above this message.

undefined reference to pthread_createC/C++

C/C++: undefined reference to `pthread_create' — missing -pthread (also `dlopen`, `clock_gettime`)

Your program uses threads (or another system library) but the linker was not told to link it.

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.

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.

Failed building wheelPython

error: subprocess-exited-with-error / Failed building wheel for x

pip had to compile a package from source and the build failed — missing compiler, headers or system libraries.

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…

Could not find a package configuration fileC/C++

CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2)

`find_package(Foo)` could not locate the library's CMake config (FooConfig.cmake or FindFoo.cmake), so the library is not install…

failed to read dockerfileDocker

failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

docker build can’t find a Dockerfile in the build context you passed.

double free or corruptionC/C++

C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped)

Memory was freed twice or the heap was corrupted (buffer overflow, freeing a non-heap pointer), so glibc aborted the program.

Two steps away (36)

expected ';' beforeC/C++

C/C++: error: expected ';' before 'x' — missing semicolon

The compiler reached a token where a statement should have ended — almost always a missing semicolon on the line above.

expected primary-expression beforeC/C++

C++: error: expected primary-expression before ')' token

The parser expected a value or expression and found a token that cannot start one — often a type name passed where a value belong…

does not name a typeC/C++

C++: error: 'string' does not name a type

Where the compiler expected a type, it found a name it does not know as one — a missing header, namespace, or class declared late…

fatal error: No such file or directoryC/C++

C/C++: fatal error: foo.h: No such file or directory — #include not found

The preprocessor cannot find a header named in `#include`: wrong path, missing include directory (-I), or the library is not inst…

multiple definition ofC/C++

C/C++: multiple definition of `x'; first defined here — ld returned 1 exit status

The linker found the same function or global variable defined in two object files — usually something defined in a header.

undefined reference to vtableC/C++

C++: undefined reference to `vtable for X' — virtual function not defined

The linker cannot find the class's virtual table, which means at least one virtual member function was declared but never defined…

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.

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.

max depth exceededDocker

Error response from daemon: max depth exceeded (too many image layers)

The image has more layers than the storage driver allows (127 for overlay2), usually from repeatedly committing containers or ver…

error while loading shared librariesLinux

error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory

The program needs a shared library (.so) that isn’t installed or isn’t on the loader’s search path.

terminate called without an active exceptionC/C++

C++: terminate called without an active exception — std::thread destroyed while joinable

A `std::thread` object was destroyed (or reassigned) while its thread was still running, so the C++ runtime called `std::terminat…

LNK1104C/C++

MSVC: fatal error LNK1104: cannot open file 'foo.lib' (or 'app.exe' while it is running)

The Visual C++ linker could not open an input library or the output file — the path is wrong, the library is missing, or the .exe…

ECONNREFUSEDNode.js

Error: connect ECONNREFUSED 127.0.0.1:5432

Nothing is listening at that host:port — the target service is down or you’re connecting to the wrong address.

408HTTP

HTTP 408 Request Timeout

The server closed the connection because the client took too long to send the complete request.

Failed to fetchJavaScript

TypeError: Failed to fetch / NetworkError when attempting to fetch resource

The browser couldn’t complete the request at the network level — CORS, DNS, offline, blocked mixed content, or the server refused…

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…

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…

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.

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.

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.

EBADENGINENode.js

npm WARN EBADENGINE Unsupported engine / The engine "node" is incompatible with this module

A package requires a different Node.js version than the one you’re running.

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.

externally-managed-environmentPython

error: externally-managed-environment

Your system Python (Debian 12+, Ubuntu 23.04+, Homebrew) refuses pip installs into the OS-managed environment (PEP 668).

pip no matching distributionPython

ERROR: Could not find a version that satisfies the requirement x (from versions: none)

pip found no installable version of the package for your Python version, OS or index.

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.

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.

redefinition ofC/C++

C++: error: redefinition of 'class X' / multiple definition — missing include guard

The same class, struct or function body was included twice in one translation unit because the header has no include guard.

not a member of stdC/C++

C++: error: 'optional' in namespace 'std' does not name a template type — wrong -std standard

The standard-library feature you used needs a newer C++ standard than the compiler is currently set to.

No rule to make targetC/C++

Make: *** No rule to make target 'foo.c', needed by 'foo.o'. Stop.

`make` was asked to build a file for which there is no rule and no existing file — a missing source, a typo in the Makefile, or a…

forbidden path outside the build contextDocker

COPY failed: forbidden path outside the build context: ../file

A COPY/ADD tries to read a file above the build context (../something); Docker only sends the context folder to the builder.

Sending build contextDocker

Docker build slow: "Sending build context to Docker daemon 2.5GB" / transferring context takes forever

docker build is uploading your whole project folder — node_modules, .git, data files — before building, because there’s no (or a…

Output directory not foundCloudflare

Cloudflare Pages build: Error: Output directory "dist" not found / Failed: build output directory not found

The Pages build finished, but the folder set as “Build output directory” doesn’t exist — the framework wrote its files somewhere…

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.