Next.js Discord

Discord Forum

Type Error: Property 'getStaticProps' is incompatible with index signature.

Unanswered
Siamese posted this in #help-forum
Open in Discord
SiameseOP
Error
Property 'getStaticProps' is incompatible with index signature.

Type 'GetStaticProps' is not assignable to type 'never'.


const Home: NextPage = ({ images }: { images: ImageProps[] }) => {
  // ...
  return <></>
}

export const getStaticProps: GetStaticProps = async () => {
  // ...
  return {
    props: {
      images: []
    }
  }
}

4 Replies

SiameseOP
what does it mean
in /app you do not have getStaticProps
SiameseOP
ohh i see, the reference i was following uses /pages. thanks!