-
Link to the code that reproduces this issuehttps://codesandbox.io/p/devbox/red-rain-64zvnc To Reproduce
workarounds:
repro codeexport default function Page() {
return (
<html lang="en">
<body>have a great day</body>
</html>
);
} Current vs. Expected behaviorexpected: no hydration error got:
Provide environment information(below but also repros on sandbox)
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020
Available memory (MB): 32768
Available CPU cores: 12
Binaries:
Node: 22.13.1
npm: 9.6.7
Yarn: N/A
pnpm: 9.15.4
Relevant Packages:
next: 15.2.0 // Latest available version is detected (15.2.0).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.3
Next.js Config:
output: N/A Which area(s) are affected? (Select all that apply)React Which stage(s) are affected? (Select all that apply)next dev (local), next build (local), next start (local) Additional contextThis is happening in in 15.1.7, 15.2 and the latest 15.3 canary as of testing (on sandbox). |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hey there, the exact same issue i'm facing too from yesterday, is there any solution?? |
Beta Was this translation helpful? Give feedback.
-
Are you rendering text directly under Looking at your error though this might be a general hydration issue (not this bug) related to those parameters on |
Beta Was this translation helpful? Give feedback.
-
Hey i got the solution i had added new extension i dont know maybe it was curropted after removing it all worked just fine, thanks! |
Beta Was this translation helpful? Give feedback.
-
@rik-iso The correct convention is to have the
|
Beta Was this translation helpful? Give feedback.
-
Hi @samcx - thanks, good to know, I must have missed that specific. Can Next.js throw a more appropriate error if this mistake is made instead of this one? Nothing about this error told me "you are missing a root layout" - and in fact my code works fine (as far as I can tell) outside of this issue without doing it so it wasn't obvious this was an issue. |
Beta Was this translation helpful? Give feedback.
@rik-iso The correct convention is to have the
<html>
and<body>
in the Root Layout → https://nextjs.org/docs/app/getting-started/layouts-and-pages#creating-a-layout.