Files
next.js/errors
d4b234030d docs: clarify /_not-found failures and <html> attribute reads under Cache Components (#95163)
## Summary

When the root layout reads request data (`cookies()`, `headers()`) under
Cache Components, the validation error often surfaces on `/_not-found` —
a real prerendered route that inherits the root layout, even though the
user has no `not-found.tsx` file. This is consistently confusing
(#67532), so:

- `errors/blocking-prerender-runtime.mdx` and
`errors/blocking-prerender-dynamic.mdx`: added a gotcha bullet pointing
the fix at the root layout when the failing route is `/_not-found`.
- `docs/01-app/02-guides/migrating-to-cache-components.mdx`: added a
`Good to know` callout in the `cookies, headers, and searchParams`
section linking to the existing [Themes
recipe](/docs/app/guides/preventing-flash-before-hydration#themes) for
the `<html data-theme>` case, since attributes on the root element can
not be wrapped in `<Suspense>`.

## Verification

- `npx alex` clean on all three files.

<!-- NEXT_JS_LLM_PR -->

---------

Co-authored-by: Joseph Chamochumbi <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
2026-06-25 15:29:24 +02:00
..
2025-05-08 13:11:38 +01:00
2025-05-12 08:32:57 -05:00
2025-05-12 08:32:57 -05:00