Description
When I run yarn build, I get this error:
Error: Usage of next-intl APIs in Server Components currently opts into dynamic rendering.
This limitation will eventually be lifted, but as a stopgap solution, you can use the `unstable_setRequestLocale` API to enable static rendering
Export encountered errors on following paths:
/_not-found/page: /_not-found
As the doc suggests, I have 2 not-found files:
app/[locale]/not-found.tsx
app/not-found.tsx
I think the error comes from this:
// app/[locale]/layout.tsx
export const generateStaticParams = () => {
return ["en"].map((locale: string) => ({ locale }));
};
Reproduction URL
https://codesandbox.io/p/github/tiavina-mika/next-intl-bug-repro-app-router
Reproduction description
Steps to reproduce:
- Open reproduction
- Open terminal
- Run
yarn build
- See error in the console
Expected behaviour
The build should be ended successfully