-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
Compatibility of now
with experimental.dynamicIO
in Next.js canary versions
#1464
Comments
That's interesting, thanks for the report! The reason is that However, in your case (and probably many other apps), there's no need for relative time formatting. Some potential solutions that come to my mind:
It seems like these approaches all have some drawbacks, e.g. not being able to forward This needs a bit further investigation. It's also still very early for PPR and Workaround As a stopgap solution, you can put a E.g. in import {getRequestConfig} from 'next-intl/server';
async function now() {
'use cache';
return new Date();
}
export default getRequestConfig(async () => ({
locale: 'en-US',
messages: {},
now: await now()
})); … or in entry points (like |
I just noticed that you can also add a function that provides |
getMessages
and getLocale
error when experimental.dynamicIO
is enabled in Next.js 15.0.2-canary.4now
with experimental.dynamicIO
in Next.js canary versions
This will be fixed in the upcoming I've been heads-down exploring implications of For users who don't use relative time formatting, there will no longer be any issues in regard to A first beta version of Thanks again for opening this issue! |
Description
When
dynamicIO
is enabled, functions such asgetMessages
orgetLocale
causenext build
to fail with the following error:Verifications
Mandatory reproduction URL
https://github.com/typeofweb/repro-nextintl
Reproduction description
Steps to reproduce:
pnpm build
.getMessages
fromlayout.tsx
.pnpm build
.Expected behaviour
No errors.
The text was updated successfully, but these errors were encountered: