Error map
Server actions must be async functions Next.js: Error: Server actions must be async functions
Next.js · layer 1, On your device
Centre: this error. First ring: errors it is linked with (8). 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 (8)
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.
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: 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: 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.
Next.js: Error: Body exceeded 1 MB limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit
A Server Action (often a file upload) sent more than the default 1 MB request body.
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 to find Server Action "abc123". This request might be from an older or newer deployment
The browser called a Server Action ID the current server build doesn't know — usually a version skew after a deploy.
Two steps away (24)
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.
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: 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: 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.
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.
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.
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.
HTTP 413 Content Too Large (Request Entity Too Large)
The request body is bigger than the server is willing to accept — usually a file upload over the configured limit.
Vercel: 413 FUNCTION_PAYLOAD_TOO_LARGE — Request Entity Too Large (4.5 MB limit)
A request or response exceeded Vercel's 4.5 MB serverless function payload limit.
Nginx: [error] client intended to send too large body: 5242880 bytes (413 Request Entity Too Large)
A request body exceeded `client_max_body_size` (default 1 MB), so Nginx returned 413 before reaching your app.
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: 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.
SyntaxError: Unexpected token '<' (HTML served instead of JavaScript)
The browser loaded a .js file but received HTML (an error page or the SPA index.html).
Refused to execute script from 'x' because its MIME type ('text/html') is not executable
The browser fetched a script but the server labelled it text/html (usually an error page), so it refused to run it.
ChunkLoadError: Loading chunk 123 failed.
A lazily loaded JavaScript chunk couldn’t be downloaded — usually because a new deployment removed the old hashed files.
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError