Error map

server-only Next.js: You're importing a component that needs "server-only". That only works in a Server Component

Next.js · layer 1, On your device

Open the full error page →

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

server-only — Next.js: You're importing a component that needs "server-only". That only works in a Server Component (Next.js)server-onlyFunctions cannot be passed — Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". (React)Functions cannot be…async Client Component — Error: async/await is not yet supported in Client Components, only Server Components. (React)async Client Compon…NEXT_REDIRECT — Next.js: Error: NEXT_REDIRECT (redirect() inside try/catch) (Next.js)NEXT_REDIRECTCan't resolve 'fs' — Module not found: Can't resolve 'fs' (Next.js / webpack 5) (React)Can't resolve 'fs'needs 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 useStatecookies() should be awaited — Next.js 15: Route "/x" used `cookies().get('token')`. `cookies()` should be awaited before using its value (Next.js)cookies() should be…Hydration failed — Error: Hydration failed because the initial UI does not match what was rendered on the server (React)Hydration failedDynamic server usage — Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `cookies` (React)Dynamic server usagenext/image hostname — Error: Invalid src prop on `next/image`, hostname "x" is not configured under images in your `next.config.js` (React)next/image hostnamePrerender error — Error occurred prerendering page "/x". Read more: https://nextjs.org/docs/messages/prerender-error (React)Prerender errorNextRouter was not mounted — Error: NextRouter was not mounted. (React)NextRouter was not …MODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDChunkLoadError — ChunkLoadError: Loading chunk 123 failed. (JavaScript)ChunkLoadErrorModule parse failed — Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type (React)Module parse failedcaching_sha2_password — Authentication plugin 'caching_sha2_password' cannot be loaded (MySQL)caching_sha2_passwo…old lockfile — npm WARN old lockfile — The package-lock.json file was created with an old version of npm, so supplemental metadata must be fetched (npm)old lockfilecb() never called — npm ERR! cb() never called! (npm)cb() never called

Directly related (6)

Two steps away (11)

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.

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

next/image hostnameReact

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.

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.

NextRouter was not mountedReact

Error: NextRouter was not mounted.

next/router’s useRouter was used inside the App Router (app/ directory), which uses next/navigation instead.

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.

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.

Module parse failedReact

Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type

Webpack found syntax it can’t parse because no loader is configured for that file (JSX, TypeScript, CSS, or modern syntax in node…

caching_sha2_passwordMySQL

Authentication plugin 'caching_sha2_password' cannot be loaded

An old MySQL client/driver can’t use MySQL 8’s default authentication plugin.

old lockfilenpm

npm WARN old lockfile — The package-lock.json file was created with an old version of npm, so supplemental metadata must be fetched

The lockfile is lockfileVersion 1 (npm 6) and npm 7+ is upgrading it.

cb() never callednpm

npm ERR! cb() never called!

An old npm crash during install — usually network/cache corruption.