Skip to content

PageProps Type Errors in Next.js #142577

Discussion options

You must be logged in to vote

Hi @Universe0809,
It appears that there are breaking changes in Next.js version 15 related to properties such as params. The official documentation highlights this issue (see: Next.js v15 Upgrade Guide).

To address these changes, you have a couple of options:

  1. Downgrade: Consider reverting to an earlier version of Next.js where these breaking changes do not apply.
  2. Update your Code: You can handle the params by awaiting them in your function as follows:
    `type Params = Promise<{ slug: string[] }>;

export default async function Page({ params }: { params: Params }) {
const { slug } = await params;
}`

This approach ensures that your application remains compatible with the latest version of Ne…

Replies: 8 comments 20 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
17 replies
@fengyunzaidushi
Comment options

@7kylor
Comment options

@prynsh
Comment options

@landed1
Comment options

@vyudh
Comment options

Answer selected by Universe0809
Comment options

You must be logged in to vote
1 reply
@suhailkhan123517
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@7kylor
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mic-andrew
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working correctly Codespaces Your development environment, in the cloud. Run VS Code and code on GitHub's cloud platform,