Reputation: 1
Can someone help me about this error. I cant find any solutions about it.
.next/types/app/admin/editmodel/[markaid]/page.ts:34:29
Type error: Type '{ params: ModelProps; }' does not satisfy the constraint 'PageProps'.
Types of property 'params' are incompatible.
Type 'ModelProps' is missing the following properties from type 'Promise': then, catch, finally, [Symbol.toStringTag]
32 |
33 | // Check the prop type of the entry function
34 | checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
| ^
35 |
36 | // Check the arguments and return type of the generateMetadata function
37 | if ('generateMetadata' in entry) {
Static worker exited with code: 1 and signal: null
I am trying to build and deploy my project and i get this error cant solve it.
Upvotes: 0
Views: 187
Reputation: 3
You need to follow this kind of format for the new dynamic links of next.js 15.1.3 and 4:
checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
// Like this:
export default async function DemoPage({ params }: { params: Promise<{ id: string }> }) {
// then get id like this
const id = (await params).id
Upvotes: 0