Error map
ReferenceError: document is not defined Next.js: ReferenceError: document is not defined
Next.js · layer 1, On your device
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.
Directly related (12)
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.
Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
The JSX produces invalid HTML nesting, which also causes hydration mismatches in SSR.
Warning: useLayoutEffect does nothing on the server
A component using useLayoutEffect was server-rendered, where layout effects can’t run.
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.
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.
Next.js: ReferenceError: localStorage is not defined / sessionStorage is not defined
`localStorage`/`sessionStorage` was read during server rendering.
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.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: ReferenceError: window is not defined / 500 Internal Server Error during SSR
Code touching browser globals ran on the server during Nuxt SSR.
Next.js: ReferenceError: window is not defined (server-side rendering)
Code touching the browser's `window` ran on the server during SSR/build, where it doesn't exist.
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: [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.
Two steps away (32)
ReferenceError: x is not defined
Code refers to a variable or function name that doesn’t exist in the current scope.
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…
Error: Invalid hook call. Hooks can only be called inside of the body of a function component.
A hook ran outside a function component/custom hook, conditionally — or two copies of React are loaded.
Warning: A component is changing an uncontrolled input to be controlled
An input’s `value` started as `undefined` (uncontrolled) and later became a defined value (controlled), or vice versa.
Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?
A component returns two sibling JSX elements without a single parent.
Warning: Cannot update a component (`Parent`) while rendering a different component (`Child`)
A child component updated a parent’s state during its render instead of in an effect or event handler.
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.
Warning: useEffect must not return anything besides a function, which is used for clean-up. It looks like you wrote useEffect(async () => ...)
An async function was passed directly to useEffect, so it returns a Promise instead of a cleanup function.
Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate.
A component keeps updating itself in an effect or lifecycle — usually a useEffect that sets state its own dependencies change.
Warning: An update to Component inside a test was not wrapped in act(...)
A component updated state after the test’s synchronous assertions — async work wasn’t awaited.
Nuxt: [Vue warn]: Hydration completed but contains mismatches.
Server HTML and client render differed; Vue patched the DOM but logs the mismatch.
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 matched location "/x"
React Router found no route definition for the current URL.
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.
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.
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! 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.
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.
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.
Error: @prisma/client did not initialize yet. Please run "prisma generate"
The generated Prisma Client is missing or out of date.
Error: Node Sass does not yet support your current environment
node-sass (deprecated) has no binary for your Node version/OS.
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: [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: /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).
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.
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.
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).
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.
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/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.
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: Unexpected token < / Parsing error: '>' expected (vue-eslint-parser not configured)
ESLint can't parse `.vue` files because the Vue parser isn't configured.
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError