-
Notifications
You must be signed in to change notification settings - Fork 295
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
fix(nextjs): Handle dynamicIO errors when request apis are accessed on prerender #4836
fix(nextjs): Handle dynamicIO errors when request apis are accessed on prerender #4836
Conversation
This reverts commit 6c8f074.
🦋 Changeset detectedLatest commit: dd47dae The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
!snapshot |
Hey @panteliselef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/[email protected] --save-exact |
…th-experimental-ppr-dynamicio-issue
…ntal-ppr-dynamicio-issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
Description
This PR resolves the issue seen below when a next.js application is using
dynamicIO: true
.What is happening
There seems to be an issue when awaiting
header()
inside another scope. When we do that we need to always await that function.Example with minimal reproduction
✅ Works
❌ Throws
Example with our structure
✅ This code works properly and will not throw unhandledRejection
❌ This code works throws unhandledRejection
Fixes #4445
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change