Error map
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 · 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)
TypeError: Missing parameter name at 1 (path-to-regexp)
An Express 5 (path-to-regexp v8) route uses old wildcard syntax like '*' or '/:id?'.
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.
No routes matched location "/x"
React Router found no route definition for the current URL.
Error: NextRouter was not mounted.
next/router’s useRouter was used inside the App Router (app/ directory), which uses next/navigation instead.
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.
Next.js: ReferenceError: document is not defined
Code used the DOM (`document`) while rendering on the server.
Next.js: ReferenceError: localStorage is not defined / sessionStorage is not defined
`localStorage`/`sessionStorage` was read during server rendering.
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.
Next.js: Invalid next.config.js options detected: Unrecognized key(s) in object: 'xyz'
`next.config.js` contains an option Next.js doesn't recognise (typo, wrong version, or moved key).
Next.js: Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported
A Server Component passed a non-serialisable value (class instance, Date-like object, Mongoose doc, Map) as a prop to a Client Co…
Next.js: Error: Route /blog used "revalidatePath /blog" during render which is unsupported. It must happen outside of renders and cached functions
`revalidatePath`/`revalidateTag` was called while rendering a page or component, not from an action or route handler.
Next.js: Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead
`` received `undefined` (or another invalid value), so Next.js can't build the link.
Two steps away (35)
HTTP 404 Not Found
The server can’t find anything at the requested URL.
HTTP 405 Method Not Allowed
The URL exists, but it doesn’t accept the HTTP method you used (e.g. POST to a GET-only route).
Whitelabel Error Page — This application has no explicit mapping for /error
Spring Boot’s default error page — the request hit no controller mapping (404) or a controller threw (500).
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.
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.
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.
Error: useNavigate() may be used only in the context of a <Router> component.
A React Router hook ran in a component that isn’t rendered inside a Router provider.
API Error: Cannot GET /api/... / No route matches / The route could not be found
The server has no route for this URL and HTTP method combination — the endpoint path, API version prefix or method is wrong.
connect: Network is unreachable (ENETUNREACH)
The host has no route to the destination network — no default gateway, interface down, or trying IPv6 without IPv6 connectivity.
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).
Error: Invalid src prop on `next/image`, hostname "x" is not configured under images in your `next.config.js`
next/image refuses to optimize images from domains not allowed in next.config.js.
Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".
A Server Component passed a function prop to a Client Component.
Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
The JSX produces invalid HTML nesting, which also causes hydration mismatches in 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: 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).
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: 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.
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.
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.
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.
Browser: Access to XMLHttpRequest at 'https://api.example.com' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header — Laravel
The browser blocked a cross-origin call to your Laravel API because the response lacks the right CORS headers.
Next.js: You're importing a component that needs createContext. It only works in a Client Component but none of its parents are marked with "use client"
A context provider (or a lib that uses `createContext`) is used in a Server Component.
Next.js 15: Error: Route "/blog/[slug]" used `params.slug`. `params` should be awaited before using its properties
In Next.js 15 `params` and `searchParams` are Promises; reading properties synchronously triggers this error/warning.
Next.js: Error [ERR_REQUIRE_ESM]: require() of ES Module next.config.js / SyntaxError: Unexpected token 'export'
The config file uses ESM syntax in a CommonJS context (or the reverse), so Node can't load it.
Next.js: Specified "headers" cannot be used with "output: export" / Image Optimization using the default loader is not compatible with `{ output: 'export' }`
Static export (`output: 'export'`) can't use server features like rewrites/headers/redirects, default image optimisation, middlew…
Next.js: Error: Invalid middleware found. Capturing groups are not allowed in matcher / `matcher` values must start with `/`
The `config.matcher` regex in middleware contains an unsupported pattern (capturing group) or invalid syntax.
TypeError: Converting circular structure to JSON
JSON.stringify met an object that references itself (directly or through children).
CastError: Cast to ObjectId failed for value "x" (type string) at path "_id"
A value that isn’t a valid 24-hex-character ObjectId was used in an _id query.
Next.js: Error: Server actions must be async functions
A function marked `"use server"` isn't declared `async`.
Next.js: Route used `cookies()` inside a function cached with `unstable_cache(...)`. Accessing Dynamic data sources inside a cache scope is not supported
A cached function reads request-specific data (cookies, headers), which would leak between users.
Next.js: Failed to set Next.js data cache for https://api.example.com/data, items over 2MB can not be cached (2437412 bytes)
A `fetch` response was too large for Next.js's data cache (limit 2 MB), so it wasn't cached.
Warning: Received `true` for a non-boolean attribute `x`.
A boolean was passed to a DOM attribute that expects a string, or a custom prop leaked through to a DOM element.
Warning: `key` is not a prop. Trying to access it will result in `undefined` being returned.
A component tried to read props.key, which React reserves and never passes down.
Next.js 13+: Error: Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>
Since Next.js 13 `` renders its own ``, so nesting your own `` is invalid.
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError