Error map

Module not found: Can't resolve 'x' (Next.js build) Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src'

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.

Module not found: Can't resolve 'x' (Next.js build) — Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src' (Next.js)Module not …TDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZTypeError: not a function — TypeError: x is not a function (JavaScript)TypeError: not a fu…Element type is invalid — Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined (React)Element type is inv…not a constructor — TypeError: x is not a constructor (JavaScript)not a constructorRouter.use middleware — TypeError: Router.use() requires a middleware function but got a Object (Node.js)Router.use middlewa…Can't resolve 'fs' — Module not found: Can't resolve 'fs' (Next.js / webpack 5) (React)Can't resolve 'fs'[Vue warn]: Component is missing template or render function — Vue: [Vue warn]: Component is missing template or render function. (Vue)[Vue warn]: Compone…Failed to compile: ESLint errors during next build — Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars (Next.js)Failed to compile: …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: JavaScr…next build: fetch failed ECONNREFUSED (build-time API) — Next.js: Error occurred prerendering page "/blog" TypeError: fetch failed { cause: Error: connect ECONNREFUSED 127.0.0.1:3000 } (Next.js)next build: fetch f…Failed to fetch font from Google Fonts — Next.js: ⨯ Failed to download `Inter` from Google Fonts. Using fallback font instead / FetchError: request to https://fonts.googleapis.com failed (Next.js)Failed to fetch fon…Component provided template option but runtime compilation is not supported — Vue: [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js" (Vue)Component provided …ReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceErrorNameError — NameError: name 'x' is not defined (Python)NameErroralready declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredMODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDTypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorAttributeError — AttributeError: 'X' object has no attribute 'y' (Python)AttributeErrorObjects are not valid as a React child — Error: Objects are not valid as a React child (React)Objects are not val…Too many re-renders — Error: Too many re-renders. React limits the number of renders to prevent an infinite loop. (React)Too many re-rendersunique key prop — Warning: Each child in a list should have a unique "key" prop (React)unique key prop1046 — MySQL ERROR 1046 (3D000): No database selected (MySQL)10461153 — MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes (MySQL)11531227 — MySQL ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation (MySQL)1227ERR_HTTP_HEADERS_SENT — Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client (Node.js)ERR_HTTP_HEADERS_SE…req.body undefined — Express: req.body is undefined / {} (body parser missing) (Node.js)req.body undefinedpath-to-regexp — TypeError: Missing parameter name at 1 (path-to-regexp) (Node.js)path-to-regexpHydration failed — Error: Hydration failed because the initial UI does not match what was rendered on the server (React)Hydration failedChunkLoadError — ChunkLoadError: Loading chunk 123 failed. (JavaScript)ChunkLoadErrorneeds 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 useStateELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEgyp ERR! — gyp ERR! build error / node-gyp rebuild failed (npm)gyp ERR!ERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPP…react-hooks/exhaustive-deps — React Hook useEffect has a missing dependency (react-hooks/exhaustive-deps) (React)react-hooks/exhaust…prisma generate — Error: @prisma/client did not initialize yet. Please run "prisma generate" (Node.js)prisma generatenode-sass — Error: Node Sass does not yet support your current environment (Node.js)node-sassheap out of memory — FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (Node.js)heap out of memoryinvalid string length — RangeError: Invalid string length (JavaScript)invalid string leng…MaxListenersExceededWarning — MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 listeners added (Node.js)MaxListenersExceede…Dynamic server usage — Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `cookies` (React)Dynamic server usagePrerender 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…npm ETIMEDOUT — npm ERR! code ETIMEDOUT — network request to https://registry.npmjs.org/x failed, reason: connect ETIMEDOUT (npm)npm ETIMEDOUTPage is missing generateStaticParams() (output: export) — Next.js: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config (Next.js)Page is missing gen…Could not find a production build in the '.next' directory — Next.js: Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server (Next.js)Could not find a pr…Module parse failed — Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type (React)Module parse failedFailed to resolve component — Vue: [Vue warn]: Failed to resolve component: x (Vue)Failed to resolve c…useSearchParams() should be wrapped in a suspense boundary — Next.js: useSearchParams() should be wrapped in a suspense boundary at page "/". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout (Next.js)useSearchParams() s…

Directly related (12)

TDZJavaScript

ReferenceError: Cannot access 'x' before initialization

A let/const/class was used before its declaration line ran (temporal dead zone) — often a circular import.

TypeError: not a functionJavaScript

TypeError: x is not a function

You called something as a function, but its value is not a function (it’s undefined, a string, an object…).

Element type is invalidReact

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined

JSX referenced a component that is undefined — almost always a default/named import mismatch.

not a constructorJavaScript

TypeError: x is not a constructor

new was used with something that isn’t a class/constructor — usually a wrong import.

Router.use middlewareNode.js

TypeError: Router.use() requires a middleware function but got a Object

app.use()/router.use() received an object instead of a function — usually a router module that wasn’t exported.

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.

[Vue warn]: Component is missing template or render functionVue

Vue: [Vue warn]: Component is missing template or render function.

A component object has neither `template` nor `render`, or an SFC import resolved wrongly.

Failed to compile: ESLint errors during next buildNext.js

Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars

`next build` runs ESLint and fails the build on lint errors.

next build: JavaScript heap out of memoryNext.js

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

Node ran out of memory while building a large Next.js app (or on a small CI/Vercel runner).

next build: fetch failed ECONNREFUSED (build-time API)Next.js

Next.js: Error occurred prerendering page "/blog" TypeError: fetch failed { cause: Error: connect ECONNREFUSED 127.0.0.1:3000 }

During `next build` a page tried to fetch data from a server (often your own app or an API) that isn't running yet.

Failed to fetch font from Google FontsNext.js

Next.js: ⨯ Failed to download `Inter` from Google Fonts. Using fallback font instead / FetchError: request to https://fonts.googleapis.com failed

`next/font/google` couldn't download the font at build/dev time (offline, firewall or proxy).

Component provided template option but runtime compilation is not supportedVue

Vue: [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js"

A component uses a string `template` but the runtime-only Vue build has no compiler.

Two steps away (36)

ReferenceErrorJavaScript

ReferenceError: x is not defined

Code refers to a variable or function name that doesn’t exist in the current scope.

NameErrorPython

NameError: name 'x' is not defined

Python doesn’t know the name — it was never assigned/imported in this scope, or it’s misspelled.

already declaredJavaScript

SyntaxError: Identifier 'x' has already been declared

The same let/const/class name was declared twice in the same scope.

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.

TypeErrorJavaScript

TypeError: Cannot read properties of undefined (reading 'x')

You tried to access a property on a value that is `undefined` (or `null`) — usually data that hasn’t loaded yet or a wrong proper…

AttributeErrorPython

AttributeError: 'X' object has no attribute 'y'

You accessed an attribute or method that doesn’t exist on that object type.

Objects are not valid as a React childReact

Error: Objects are not valid as a React child

You tried to render a plain object (or a Promise/Date) directly in JSX; React can only render strings, numbers, elements and arra…

Too many re-rendersReact

Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.

A state update runs during render, which triggers another render, which updates state again — forever.

unique key propReact

Warning: Each child in a list should have a unique "key" prop

When rendering a list with `.map()`, each element needs a stable, unique `key` so React can track items between renders.

1046MySQL

MySQL ERROR 1046 (3D000): No database selected

A query referenced tables without a database selected (no USE and no db in the connection).

1153MySQL

MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes

A single statement or row exceeded max_allowed_packet — big BLOBs, huge INSERTs or large dump lines.

1227MySQL

MySQL ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

The import or statement needs SUPER/SYSTEM_VARIABLES_ADMIN — typical with dumps containing DEFINER clauses or SET GLOBAL on manag…

ERR_HTTP_HEADERS_SENTNode.js

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

An Express/Node handler tried to send a second response (or set headers) after one was already sent.

req.body undefinedNode.js

Express: req.body is undefined / {} (body parser missing)

Express didn’t parse the request body because no body-parsing middleware matched the request’s Content-Type.

path-to-regexpNode.js

TypeError: Missing parameter name at 1 (path-to-regexp)

An Express 5 (path-to-regexp v8) route uses old wildcard syntax like '*' or '/:id?'.

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.

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.

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.

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.

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.

react-hooks/exhaustive-depsReact

React Hook useEffect has a missing dependency (react-hooks/exhaustive-deps)

ESLint warns that the effect reads a value that isn’t in its dependency array, so it may use a stale value.

prisma generateNode.js

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

The generated Prisma Client is missing or out of date.

node-sassNode.js

Error: Node Sass does not yet support your current environment

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

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.

invalid string lengthJavaScript

RangeError: Invalid string length

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

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.

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).

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.

npm ETIMEDOUTnpm

npm ERR! code ETIMEDOUT — network request to https://registry.npmjs.org/x failed, reason: connect ETIMEDOUT

npm couldn’t reach the registry in time — network, proxy or firewall issue.

Page is missing generateStaticParams() (output: export)Next.js

Next.js: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config

A dynamic route can't be statically exported without telling Next.js which paths to generate.

Could not find a production build in the '.next' directoryNext.js

Next.js: Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server

`next start` was run without a prior successful `next build` (or the `.next` folder is missing).

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…

Failed to resolve componentVue

Vue: [Vue warn]: Failed to resolve component: x

The template uses a component tag that isn’t registered or imported where it’s used.

useSearchParams() should be wrapped in a suspense boundaryNext.js

Next.js: useSearchParams() should be wrapped in a suspense boundary at page "/". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout

A Client Component using `useSearchParams` is statically rendered, so the build needs a Suspense boundary for the client-only par…