Unable to build my nextjs app

When ever I try to build the nextjs webapp it shows the following error.
@bappyasif

Error:
Type error: Type ‘OmitWithTag<HomeProps, keyof PageProps, “default”>’ does not satisfy the constraint ‘{ [x: string]: never; }’.
Property ‘session’ is incompatible with index signature.
Type ‘Session’ is not assignable to type ‘never’.

// Check the prop type of the entry function
checkFields<Diff<PageProps, FirstArg<TEntry[‘default’]>, ‘default’>>()
^
// Check the arguments and return type of the generateMetadata function
if (‘generateMetadata’ in entry) {

'use client'

import Modal from '@/components/Modal'
import Header from '@/components/layout/Header'

import { FC } from 'react'
import { SessionProvider } from 'next-auth/react'
import { Session } from 'next-auth'
import Form from '@/components/Form'
import PostFeed from '@/components/Posts/PostFeed'

interface HomeProps {
  session: Session
}

const Home: FC<HomeProps> = ({ session }) => {
  return (
    <>
      <SessionProvider session={session}>
        <Header label='Home' />
        <Form placeholder='Whats Happening?' />
        <PostFeed />
      </SessionProvider>
    </>
  )
}

export default Home


i’ve started learning about typescript recently, so cant really tell exactly what should be return type for that function!!

but i would say, error message is “very descriptive enough to spot that”, can you trace them back to your “code”?!

  • what version of react are you using for this app?

I am using 18.2.0 version on this app.