Skip to content

Missing <html> and <body> tags in the root layout with multiple root layout #82446

@mjy9088

Description

@mjy9088

Link to the code that reproduces this issue

https://github.com/my-trash-bin/250808

To Reproduce

  1. run npm ci && npm run dev
  2. open https://localhost:3000/test/test or equivalent
  3. runtime error happen: Missing <html> and <body> tags in the root layout.

Current vs. Expected behavior

ls -R src output below:

src:
app/

src/app:
(others)/
[locale]/
layout.tsx

src/app/(others):
layout.tsx
page.tsx

src/app/[locale]:
layout.tsx
page.tsx

All pages are under src/app/*/... and src/app/*/layout.tsx has <html> and <body>.

As a result, I provided root layout with <html> and <body>. No error expected.

But an error has been occurred.

Provide environment information

- OS: Windows
- Node.js version: v20.18.0
- npm version: 10.8.2
- package versions:
  - next: 15.4.6
  - react: 19.1.1
- No `next.config.js` or equivalent

Which area(s) are affected? (Select all that apply)

Dynamic Routes, Error Handling, Not Found, Route Handlers, Internationalization (i18n)

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

Metadata

Metadata

Assignees

Labels

Dynamic RoutesRelated to dynamic routes.Error HandlingRelated to handling errors (e.g., error.tsx, global-error.tsx).Internationalization (i18n)Related to Internationalization with Next.js.Not FoundRelated to the not-found.tsx file or the notFound() function.Route HandlersRelated to Route Handlers.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions