Next.js Discord

Discord Forum

Application error.

Answered
Munchkin posted this in #help-forum
Open in Discord
MunchkinOP
Hey, I trying to get my project build. However it seems to throwing me a big error. So i tried to fix some open errors i could previously ingore.

One of them being validateDOMNesting(...): <html> cannot appear as a child of <body>.

I have checked my whole project but not once am i nesting html in a div. unfortunately i have no idea where to look cause the console is not giving me a specific place to look at.
Answered by Munchkin
Ye i just fixed it. Turns out it was a problem in my variables doc.
View full answer

7 Replies

MunchkinOP
these are all the html mentions:
This is the original error btw:
https://pastebin.com/f2qiWD80
MunchkinOP
I am so lost on this one. Cause x(e) is not even mentioned once
Barbary Lion
Everything is rendered in <body /> at your root ~/app/layout.tsx. All your routes have <html /> so its rendering all the children <html /> in side your layout.tsx

Mine for example:
MunchkinOP
Ye i noticed that well. I also notice the main error happening on build. I might have figured it out but i needed like 20 pushes
MunchkinOP
Ye i just fixed it. Turns out it was a problem in my variables doc.
Answer