79664232

Date: 2025-06-13 00:31:32
Score: 3
Natty:
Report link

Well the error suggests that your default export function doesnt return a valid React component. Would you mind sharing some code to look at?

edit

I believe this was already answered. Have you tried?

Date: 23/01/2021

I've also faced this issue on my Next.js app.

If you're using a functional component instead of a class component you'll get this error as well in some casses. Exactly I don't know why this is happening but I just resolved this issue by exporting my component at the bottom of the page.

Like this,

Case Error scenario:

export default function Home(){
      return (<>some stuffs</>)
}

Home.getInitialProps = async (ctx) => {
    return {}
}
Error: The default export is not a React Component in page: "/"

How to resolved it?

I just put my export at the bottom my page and then it'll be gone.

Like this,

function Home(){
      return (<>some stuffs</>)
}

Home.getInitialProps = async (ctx) => {
    return {}
}

export default Home;

Hopefully, it'll be helpful for you!

Reasons:
  • Blacklisted phrase (2): Would you mind
  • Whitelisted phrase (-1): Have you tried
  • RegEx Blacklisted phrase (1.5): How to resolved it?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Nicolas A