-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Error When Updating next-intl to 3.0.0-rc.4: 'unstable_setRequestLocale' Requires Static Rendering but 'cookies' Are Necessary for Auth #559
Comments
If I remove the
|
@amannn Please check from https://github.com/abiddraws/MyNextJs . If you try to build |
The issue is this line here: https://github.com/abiddraws/MyNextJs/blob/1b4bb4cd148107c6a8d636c953f63e642d975b1f/app/page.tsx#L1 The navigation APIs from I made a note in #149 to improve the error message here. Thanks for the report! |
🌟 Thanks a million! Your help made my day! 🙌 |
Description
Description:
When attempting to update the 'next-intl' package to version 3.0.0-rc.4, it insists on using static rendering through the 'unstable_setRequestLocale' API. However, my application relies on the use of cookies for authentication, and this requirement for static rendering is causing build-time errors.
Error Message:
If I run without
unstable_setRequestLocale
, I am getting the below errorAdditional Information:
Possible Solutions:
I am looking for guidance on how to resolve this issue. Is there a workaround that would allow me to continue using cookies for authentication while still utilizing 'next-intl' version 3.0.0-rc.4 and its 'unstable_setRequestLocale' feature for static rendering?
Your assistance and insights would be greatly appreciated. Thank you!
Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://codesandbox.io/p/sandbox/next-intl-bug-template-app-forked-hk8yrr?file=%2Fpackage.json%3A5%2C15
Reproduction description
Expected behaviour
The application should build successfully, even if cookies are being used for authentication.
Actual Behavior:
The build process fails with the error message: "Page couldn't be rendered statically because it used 'cookies'."
The text was updated successfully, but these errors were encountered: