Skip to content

PPR: A required root parameter (locale) was not provided in generateStaticParams for /[locale] #1618

@DiPSoMaNiE

Description

@DiPSoMaNiE

Description

Starting from [email protected] with experimental ppr enabled and use of setRequestLocale, I get the following error:

Error: A required root parameter (locale) was not provided in generateStaticParams for /[locale], please provide at least one value.

This error happened while generating the page. Any console logs will be displayed in the terminal window.
validateParams
node_modules/next/src/build/static-paths/app.ts (187:15)
validateParams
node_modules/next/src/build/static-paths/app.ts (512:7)

The error also occurs on [email protected] and [email protected] but everything works fine on [email protected].

Not knowing if it's a next-intl or a next issue, I'm reporting this in case it is an upcoming breaking change from next.

Verifications

Mandatory reproduction URL

https://github.com/DiPSoMaNiE/next-intl-bug-repro-app-router

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Run bun run dev (or install / run dev with another package manager)
  3. Visit http://localhost:3000 and see error

Expected behaviour

Should not get any error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions