You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Thanks for the report! I think that's related to the upcoming rootParams API, which should make setRequestLocale obsolete. I've got an experimental PR open here that explores these upcoming features: #1531. It's still a bit early with these APIs, I'm currently investigating how these can be adopted. I hopefully have more to share on this soon!
Have you tried adding generateStaticParams as mentioned in the error message?
Thanks for the report! I think that's related to the upcoming rootParams API, which should make setRequestLocale obsolete. I've got an experimental PR open here that explores these upcoming features: #1531. It's still a bit early with these APIs, I'm currently investigating how these can be adopted. I hopefully have more to share on this soon!
Have you tried adding generateStaticParams as mentioned in the error message?
I am experiencing the same issue on 15.1.1-canary.20, but I am not using setRequestLocale and I am using:
I have a nested layout like [locale]/some-path/[slug]. When trying to define generateStaticParams for the dynamic slug segment I get this error, but only if I have an empty array returned.
Should still be working IMO, so I guess it is a next bug. Let me know what you think!
I ran into the same issue when trying PPR on my new project. Turns out I missed the static rendering section: https://next-intl.dev/docs/getting-started/app-router/with-i18n-routing#static-rendering
It explains adding the generateStaticParams and setRequestLocale that are necessary to get it working. After adding those, it works fine. @amannn hopefully the rootParams API will be released soon.
Description
Starting from
[email protected]
with experimental ppr enabled and use ofsetRequestLocale
, I get the following error: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:
bun run dev
(or install / run dev with another package manager)Expected behaviour
Should not get any error.
The text was updated successfully, but these errors were encountered: