Error map
Middleware matcher: Capturing groups are not allowed Next.js: Error: Invalid middleware found. Capturing groups are not allowed in matcher / `matcher` values must start with `/`
Next.js · layer 1, On your device
Centre: this error. First ring: errors it is linked with (7). 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 (7)
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: 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: 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: Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Code in middleware or an Edge route uses `eval`/`new Function`, which the Edge Runtime forbids.
Next.js: The edge runtime does not support Node.js 'crypto' module / A Node.js module is loaded ('fs') which is not supported in the Edge Runtime
Middleware or an Edge route imported a Node.js built-in (`fs`, `crypto`, `path`, `net`) that isn't available on the Edge.
Browser: This page isn't working — redirected you too many times (ERR_TOO_MANY_REDIRECTS) with Next.js middleware / trailing slash
Middleware (or config redirects) keeps redirecting between the same URLs.
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.
Two steps away (15)
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.
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.
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…
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.
Vercel: The Edge Function "middleware" size is 1.2 MB and your plan size limit is 1 MB. Learn More: https://vercel.link/edge-function-size
Your middleware/Edge Function bundle is larger than the plan's size limit.
NextAuth / Auth.js: [next-auth][error][NO_SECRET] Please define a `secret` in production / MissingSecret
Auth.js needs a secret (NEXTAUTH_SECRET / AUTH_SECRET) in production to sign and encrypt tokens/cookies.
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.
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.
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError