Property 'generateMetaData' is incompatible with index signature.
Answered
Chinese perch posted this in #help-forum
Chinese perchOP
I researched and found this is a type mismatch error? I am following https://www.youtube.com/watch?v=fqfer6xMp2A&ab_channel=CodinginFlow , at 1:58:36 .
Folder structure is given in the image.
Here is the page.tsx file, selected in the folder structure image, from which the error originates: https://gist.github.com/PrateekPathak9002/83517e2e1973d20e90529c4c9fe4756c
Complete error :
What might be the issue??
Folder structure is given in the image.
Here is the page.tsx file, selected in the folder structure image, from which the error originates: https://gist.github.com/PrateekPathak9002/83517e2e1973d20e90529c4c9fe4756c
Complete error :
Type error: Type 'OmitWithTag<typeof import("E:/anshu/js3/framework/my-app-2/src/app/topic/[topic]/page"), "metadata" | "generateStaticParams" | "default" | "config" | "revalidate" | "dynamic" | "dynamicParams" | ... 4 more ... | "generateMetadata", "">' [x: string]: never; }'.
Property 'generateMetaData' is incompatible with index signature.
Type '({ params: { topic } }: PageProps) => Metadata' is not assignable to type 'never'.
6 |
7 | // Check that the entry is a valid entry
> 8 | checkFields<Diff<{
| ^
9 | default: Function
10 | config?: {}
11 | generateStaticParams?: FunctionWhat might be the issue??
4 Replies
Chinese perchOP
@joulev It’s generateMetadata not generateMetaData
Chinese perchOP
oof
thanks