Skip to content
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

Next 15 breaking Async Request APIs #1471

Closed
3 tasks done
ChiefORZ opened this issue Oct 26, 2024 · 2 comments
Closed
3 tasks done

Next 15 breaking Async Request APIs #1471

ChiefORZ opened this issue Oct 26, 2024 · 2 comments
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@ChiefORZ
Copy link

Description

With the breaking change of the Next.js version 15 of the Async Request APIs we need to change the implementation of receiving the headers in Server-Side Rendering.

Currently the following error occurs, when trying to access const t = useTranslations() in an Server Component:

[ Server ]  Error: Route "/[locale]" used `headers().get('X-NEXT-INTL-LOCALE')`. `headers()` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis

Verifications

Mandatory reproduction URL

https://github.com/amannn/next-intl-bug-repro-app-router

Reproduction description

git clone https://github.com/amannn/next-intl-bug-repro-app-router
cd next-intl-bug-repro-app-router
pnpm i
pnpm up next@^15
pnpm dev

Expected behaviour

Repository should be updated to support next@15

@ChiefORZ ChiefORZ added bug Something isn't working unconfirmed Needs triage. labels Oct 26, 2024
@ChiefORZ
Copy link
Author

duplicate of #1375 (comment)

@amannn
Copy link
Owner

amannn commented Oct 26, 2024

Please see: #1375 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants