-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NextJS 14 with Next-intl (3.23.5) making every page dynamic #1477
Comments
I can confirm this behavior with next 15.0.1 and next-intl 3.23.5. |
Thank you for your report! Unfortunately, the reproduction is missing or incomplete, and as such we cannot investigate this issue. Please add a reproduction to the issue, otherwise it will be closed automatically. Templates: Creating a good reproduction takes time. To help us resolve the issue quickly, please simplify the reproduction as much as possible by removing any unnecessary code, files, and dependencies that are not directly related to the problem. The easier it is for us to see the issue, the faster we can help you. Apart from the reproduction, make sure to include the precise steps on how to reproduce the issue, e.g.:
Thank you for your understanding! FAQ"I've included a reproduction, what is missing?" This comment might have been added because your reproduction doesn't point to a destination where the issue can be reproduced. Please make sure that the latest changes were saved in the reproduction and that the link is correct. |
Can confirm this happening as well. Next 15.0.2 with next-intl 3.23.5. I'm explicitly setting Edit: patched in some logging and it looks like |
Interesting, could be this bug in Next.js: vercel/next.js#71623 |
While this resolves the static rendering I don't think it allows localized Is there another way to make localized PS: I'm happy to create a repro if that helps! |
@chrilis As far as I know this is still possible in Next.js 14 (see App Router example): In Next.js 15 I haven't found a way to achieve this yet, related to the bug that's mentioned above. Note that the Next.js team is working on a new API specifically for cases like i18n to improve locale handling (see #663 (comment)). I think this could help to solve this in a clean way in the future without having to rely on |
Thank you for your quick reply @amannn! Maybe I'm wrong, but I think it's also relevant for Next.js 14, see [repro] (https://github.com/chrilis/next-intl/tree/repro/localized-404-static-rendering). |
Why would you want to add As a side note, it seems like we can get rid of |
Description
I followed the instructions in the documentation for the latest version. However, when I build, all my pages switch to dynamic rendering (even though my pages are not in a dynamic route like [locale]).
Even though I used setRequestLocale, it still doesn’t switch to static rendering.
You can check the screenshot below.
Verifications
Mandatory reproduction URL
https://github.com/amannn/next-intl/tree/main/examples/example-app-router
Reproduction description
Steps to reproduce:
Clone this example Next.js project from next-intl:
https://github.com/amannn/next-intl/tree/main/examples/example-app-router
Create a new page in the app folder, for example: app/test/page.tsx.
After creating the page, run npm run build in the project’s terminal.
You'll notice in the terminal that my test page is now set to dynamic rendering, even though it’s not part of a dynamic [locale] route.
Expected behaviour
Pages that are not within a dynamic route should, by default, be statically rendered during the build process.
The text was updated successfully, but these errors were encountered: