Type error: Type 'PageProps' does not satisfy the constraint #80907
Unanswered
Balaji0736
asked this question in
App Router
Replies: 1 comment
-
Use this: export default async function Page({ params } : { params: Promise<{ slug: string; }> }) {
const { slug } = await params; Here's a bit more data, https://nextjs.org/docs/app/api-reference/file-conventions/page#reading-searchparams-and-params-in-client-components This was part of v15 breaking changes announced here: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We are developed a new website using nextJS framework as frontend and Wordpress (Headless Wordpress ) as admin dashboard. We used the app router and typescript files.
Now, we executed the build command.
we unable to resolve the below error to run the production site.
Can you please help.
Error:
.next/types/app/(site)/achievements/[slug]/page.ts:34:29
Type error: Type 'PageProps' does not satisfy the constraint 'import("E:/wamp/www/startup-pro-main/.next/types/app/(site)/achievements/[slug]/page").PageProps'.
Types of property 'params' are incompatible.
Type '{ slug: string; }' is missing the following properties from type 'Promise': then, catch, finally, [Symbol.toStringTag]
32 |
33 | // Check the prop type of the entry function
Beta Was this translation helpful? Give feedback.
All reactions