Error AtlasError Documentation and Resolution

Next.js root layout is missing html or body tags

Missing Root Layout tags

Next.js found a root layout that does not include the required html and body tags, which are mandatory in the App Router root layout.

Missing Root Layout tagsrendering
Missing Root Layout tags
  • The root layout returns children directly without wrapping html and body tags.
  • One of the required root tags was removed during a refactor.
  • The layout component was customized without preserving the required document structure.
  1. Return both html and body elements from the app root layout.
  2. Confirm the layout wraps children inside body rather than returning children alone.
  3. Retest the App Router build after restoring the required root layout structure.
Next.js Docs: Missing Root Layout tags
Next.js Missing Root Layout tags: causes and fixes | Error Atlas