Error map

ReferenceError: window is not defined Next.js: ReferenceError: window is not defined (server-side rendering)

Next.js · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (11). 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.

ReferenceError: window is not defined — Next.js: ReferenceError: window is not defined (server-side rendering) (Next.js)ReferenceEr…Can't resolve 'fs' — Module not found: Can't resolve 'fs' (Next.js / webpack 5) (React)Can't resolve 'fs'Hydration error: <div> cannot be a descendant of <p> — Next.js: Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p> / In HTML, <p> cannot be a descendant of <p>. This will cause a hydration error (Next.js)Hydration error: <d…Conflicting app and page file was found — Next.js: ⨯ Conflicting app and page file was found, please remove the conflicting files to continue: "pages/index.tsx" - "app/page.tsx" (Next.js)Conflicting app and…ReferenceError: document is not defined — Next.js: ReferenceError: document is not defined (Next.js)ReferenceError: doc…ReferenceError: localStorage is not defined — Next.js: ReferenceError: localStorage is not defined / sessionStorage is not defined (Next.js)ReferenceError: loc…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…Nuxt: window/document/localStorage is not defined (SSR) — Nuxt: ReferenceError: window is not defined / 500 Internal Server Error during SSR (Vue)Nuxt: window/docume…TypeError: Failed to parse URL from /api/... — Next.js: TypeError: Failed to parse URL from /api/posts (fetch in a Server Component) (Next.js)TypeError: Failed t…[Vue warn]: Hydration node/text/children mismatch — Vue: [Vue warn]: Hydration text content mismatch / Hydration node mismatch: server rendered element contains more child nodes than client vdom (Vue)[Vue warn]: Hydrati…Nuxt: Hydration completed but contained mismatches — Nuxt: [Vue warn]: Hydration completed but contains mismatches. (Vue)Nuxt: Hydration com…MODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDHydration 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)ChunkLoadErrorvalidateDOMNesting — Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. (React)validateDOMNestingneeds 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 useStateCORS error calling Next.js API route / route handler — Browser: Access to fetch at 'https://api.example.com/api/data' from origin 'https://app.example.com' has been blocked by CORS policy (Next.js route handler) (Next.js)CORS error calling …path-to-regexp — TypeError: Missing parameter name at 1 (path-to-regexp) (Node.js)path-to-regexpNo routes matched — No routes matched location "/x" (React)No routes matchedPrerender error — Error occurred prerendering page "/x". Read more: https://nextjs.org/docs/messages/prerender-error (React)Prerender erroruseLayoutEffect SSR — Warning: useLayoutEffect does nothing on the server (React)useLayoutEffect SSRProp did not match — Warning: Prop `className` did not match. Server: "x" Client: "y" (React)Prop did not matchQuotaExceededError — QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value exceeded the quota (JavaScript)QuotaExceededErrorELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEgyp ERR! — gyp ERR! build error / node-gyp rebuild failed (npm)gyp ERR!heap out of memory — FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (Node.js)heap out of memoryERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPP…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-sassuseAsyncData/useFetch must be called in setup (key/context) — Nuxt: [nuxt] [useAsyncData] key must be a string / useFetch only works inside setup, plugins or middleware (Vue)useAsyncData/useFet…Nuxt: Failed to fetch dynamically imported module (after deploy) — Nuxt: [nuxt] error caught during app initialization TypeError: Failed to fetch dynamically imported module / Loading chunk failed (Vue)Nuxt: Failed to fet…Nuxt 404: Page not found (route/file naming) — Nuxt: 404 Page not found: /blog/my-post / [Vue Router warn]: No match found for location with path (Vue)Nuxt 404: Page not …Dynamic server usage — Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `cookies` (React)Dynamic server usagePage 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…process.env.X is undefined in the browser (NEXT_PUBLIC_) — Next.js: process.env.API_URL is undefined in Client Component / env variable not available in the browser (Next.js)process.env.X is un…Vite: Failed to parse source / Unknown file extension ".vue" — Vite/Vue: [plugin:vite:import-analysis] Failed to parse source for import analysis — you may need to install appropriate plugins to handle the .vue file format (Vue)Vite: Failed to par…vue-loader was used without the corresponding plugin — Webpack: Error: [vue-loader] vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config. (Vue)vue-loader was used…ESLint Parsing error in .vue files — ESLint: Parsing error: Unexpected token < / Parsing error: '>' expected (vue-eslint-parser not configured) (Vue)ESLint Parsing erro…Nuxt/Vite: Failed to resolve import "~/..." or "@/..." — Nuxt: [vite] Internal server error: Failed to resolve import "~/components/Foo.vue" from "pages/index.vue". Does the file exist? (Vue)Nuxt/Vite: Failed t…[Vue warn]: Failed to locate Teleport target with selector — Vue: [Vue warn]: Failed to locate Teleport target with selector "#modal". Note the target element must exist before the component is mounted (Vue)[Vue warn]: Failed …

Directly related (11)

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.

Hydration error: <div> cannot be a descendant of <p>Next.js

Next.js: Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p> / In HTML, <p> cannot be a descendant of <p>. This will cause a hydration error

The rendered HTML has an invalid element nesting, so the browser "fixes" it and React's hydration no longer matches.

Conflicting app and page file was foundNext.js

Next.js: ⨯ Conflicting app and page file was found, please remove the conflicting files to continue: "pages/index.tsx" - "app/page.tsx"

The same URL is defined in both the `app` and `pages` directories.

ReferenceError: document is not definedNext.js

Next.js: ReferenceError: document is not defined

Code used the DOM (`document`) while rendering on the server.

ReferenceError: localStorage is not definedNext.js

Next.js: ReferenceError: localStorage is not defined / sessionStorage is not defined

`localStorage`/`sessionStorage` was read during server rendering.

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.

Nuxt: window/document/localStorage is not defined (SSR)Vue

Nuxt: ReferenceError: window is not defined / 500 Internal Server Error during SSR

Code touching browser globals ran on the server during Nuxt SSR.

TypeError: Failed to parse URL from /api/...Next.js

Next.js: TypeError: Failed to parse URL from /api/posts (fetch in a Server Component)

`fetch('/api/x')` with a relative URL works in browsers but not on the server, which has no base URL.

[Vue warn]: Hydration node/text/children mismatchVue

Vue: [Vue warn]: Hydration text content mismatch / Hydration node mismatch: server rendered element contains more child nodes than client vdom

Server-rendered HTML differs from what the client renders on first load.

Nuxt: Hydration completed but contained mismatchesVue

Nuxt: [Vue warn]: Hydration completed but contains mismatches.

Server HTML and client render differed; Vue patched the DOM but logs the mismatch.

Two steps away (29)

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.

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.

validateDOMNestingReact

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.

The JSX produces invalid HTML nesting, which also causes hydration mismatches in SSR.

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.

CORS error calling Next.js API route / route handlerNext.js

Browser: Access to fetch at 'https://api.example.com/api/data' from origin 'https://app.example.com' has been blocked by CORS policy (Next.js route handler)

A cross-origin request to your Next.js API route is blocked because the response lacks CORS headers.

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?'.

No routes matchedReact

No routes matched location "/x"

React Router found no route definition for the current URL.

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.

useLayoutEffect SSRReact

Warning: useLayoutEffect does nothing on the server

A component using useLayoutEffect was server-rendered, where layout effects can’t run.

Prop did not matchReact

Warning: Prop `className` did not match. Server: "x" Client: "y"

A prop rendered on the server differs from the client — usually CSS-in-JS class names or random IDs.

QuotaExceededErrorJavaScript

QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value exceeded the quota

localStorage/sessionStorage is full (about 5 MB per origin) or storage is disabled.

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.

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.

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.

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.

useAsyncData/useFetch must be called in setup (key/context)Vue

Nuxt: [nuxt] [useAsyncData] key must be a string / useFetch only works inside setup, plugins or middleware

`useFetch`/`useAsyncData` were used in an event handler, after an await, or without a key where one is required.

Nuxt: Failed to fetch dynamically imported module (after deploy)Vue

Nuxt: [nuxt] error caught during app initialization TypeError: Failed to fetch dynamically imported module / Loading chunk failed

A browser tab running the old build requests chunk files that were replaced by a new deployment.

Nuxt 404: Page not found (route/file naming)Vue

Nuxt: 404 Page not found: /blog/my-post / [Vue Router warn]: No match found for location with path

Nuxt's file-based router has no page matching the URL (wrong file/folder names or missing param syntax).

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

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.

process.env.X is undefined in the browser (NEXT_PUBLIC_)Next.js

Next.js: process.env.API_URL is undefined in Client Component / env variable not available in the browser

Only variables prefixed `NEXT_PUBLIC_` are exposed to browser code, and they're inlined at build time.

Vite: Failed to parse source / Unknown file extension ".vue"Vue

Vite/Vue: [plugin:vite:import-analysis] Failed to parse source for import analysis — you may need to install appropriate plugins to handle the .vue file format

Vite can't process `.vue` files because the Vue plugin isn't installed/enabled.

vue-loader was used without the corresponding pluginVue

Webpack: Error: [vue-loader] vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.

Webpack config uses `vue-loader` but doesn't add its plugin.

ESLint Parsing error in .vue filesVue

ESLint: Parsing error: Unexpected token < / Parsing error: '>' expected (vue-eslint-parser not configured)

ESLint can't parse `.vue` files because the Vue parser isn't configured.

Nuxt/Vite: Failed to resolve import "~/..." or "@/..."Vue

Nuxt: [vite] Internal server error: Failed to resolve import "~/components/Foo.vue" from "pages/index.vue". Does the file exist?

Vite couldn't resolve an alias import — the file doesn't exist at that path or the alias isn't defined.

[Vue warn]: Failed to locate Teleport target with selectorVue

Vue: [Vue warn]: Failed to locate Teleport target with selector "#modal". Note the target element must exist before the component is mounted

`` can't find its target element when mounting.