Next.js Discord

Discord Forum

Rendering error

Unanswered
Tiphiid wasp posted this in #help-forum
Open in Discord
Tiphiid waspOP
Hello
I m getting the error as in image while i was doing next.js tutorial
Can anyone have the idea why i m getting this?

and something that i observed was this error is appearing when i add a body tag in layout.jsx in app directory

This is the code that i have been using
import '@styles/globals.css'
export const metadata = {
title:"Promptverse",
description:"Discover AI prompts"
}

const MainLayout = () => {
return (
<html>
<body>
<p>Hello</p>
</body>
</html>
);
};


I m getting the error as in image when i use body tag in the above script, if i remove it the application works fine

2 Replies

you dont have a page.tsx being rendered as children.
Tiphiid waspOP
there is page.tsx