Error AtlasError Documentation and Resolution

Next.js documented errors

Browse Next.js error messages, error codes, troubleshooting explanations, and practical fixes with exact wording and search-friendly reference pages.

This Next.js error reference is designed for users searching exact Next.js error messages, error codes, and clear how-to-fix guidance.

Next.js users often search exact error messages and error codes rather than general documentation topics, so this hub is written to support copied-message search as well as product browsing.

Each Next.js entry focuses on what the error means, why it happens, and what to check next so the page is useful both from search engines and from internal navigation.

Back to all products

Build errors

Build Errors errors

Configuration errors

Invalid next.config.jsNext.js configuration contains invalid optionsNext.js detected invalid configuration keys or values in next.config.js, often because of typos, removed options, or values of the wrong type.
next.config.js Loading ErrorNext.js could not load next.config.jsNext.js failed while loading next.config.js or next.config.mjs, usually because of a syntax problem or an import that is not available in the current Node.js environment.
Invalid i18n configNext.js invalid i18n configurationNext.js found an invalid i18n configuration in next.config.js, such as an unsupported shape, too many locales, or inconsistent domain settings.
Invalid images configNext.js invalid images configurationNext.js detected an invalid images configuration in next.config.js, often because image settings use unsupported values, invalid limits, or malformed patterns.
Invalid Layout or Page ExportNext.js invalid layout or page exportNext.js found a layout or page file exporting a field that is not allowed in the app directory, such as a custom export instead of a supported segment option.
Invalid use server valueNext.js invalid use server export valueNext.js detected a use server file exporting something other than async functions, which is invalid because Server Actions must be declared as async exports.
Invalid webpack resolve aliasNext.js invalid webpack resolve alias overrideNext.js detected a custom webpack resolve.alias override that replaced internal aliases instead of extending them, which breaks framework internals during build.
Built-in next/fontNext.js still using the deprecated @next/font packageNext.js detected that the deprecated @next/font package is still installed or imported even though next/font is built into the framework.

Rendering errors

No async Client ComponentNext.js client component cannot be asyncNext.js detected a Client Component declared as an async function, which is unsupported because React Client Components cannot be async.
createContext in a Server ComponentNext.js createContext used in a Server ComponentNext.js detected React context creation inside a Server Component, which is unsupported because createContext only works in Client Components.
DynamicServerErrorNext.js Dynamic Server Usage loses request contextRequest APIs such as cookies and headers rely on the active request context. Calling them in detached asynchronous work can produce an uncaught DynamicServerError during generation.
Text content does not match server-rendered HTMLNext.js hydration mismatchThe server HTML and the first browser render disagree. React cannot reliably attach the client tree to the prerendered markup until that mismatch is corrected.
Dynamic APIs are AsynchronousNext.js params and request APIs must be awaitedNext.js 15 changed request-dependent APIs to asynchronous values. Accessing properties, spreading, or iterating those values before unwrapping them triggers migration warnings or errors.
Missing Root Layout tagsNext.js root layout is missing html or body tagsNext.js found a root layout that does not include the required html and body tags, which are mandatory in the App Router root layout.
Uncached data was accessed outside of <Suspense>Next.js uncached data needs Suspense or cachingWith cacheComponents enabled, request-time asynchronous data must have a parent Suspense boundary so Next.js can render a fallback. Data intended for reuse instead needs an explicit caching design.
Missing Suspense boundary with useSearchParamsNext.js useSearchParams needs a Suspense boundaryReading useSearchParams in a statically rendered route can force client rendering up to the nearest Suspense boundary. Without that boundary, a production build can fail and the page may otherwise remain blank until JavaScript loads.

Runtime errors