Skip to content

Error: The default export is not a React Component in “/page”

It looks like your Next.js app is using the App Router (app directory), and the default export in app/page.tsx is not recognized as a React component.

✅ Solution: Ensure Correct Default Export

Modify app/page.tsx to correctly export a React component:

import Chat from "./components/Chat";
export default function Home() {
return (
<main className="container">
<h1 className="title">Welcome to My AI Chatbot</h1>
<Chat />
</main>
);
}

Leave a Reply

Discover more from Sowft | Transforming Ideas into Digital Success

Subscribe now to keep reading and get access to the full archive.

Continue reading