- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 108
Next.js 15 requires params
in Route Handlers to be awaited
#1797
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
Comments
Thanks for bringing this up @AmruthPillai ! We should fix it soon. Would you be interested in making a PR for it? I'll be happy to facilitate. |
@ymc9 I have raised PR for the same, followed the contribution guide to match the right branch to fork from ( |
Hi @AmruthPillai , thanks for making the PR! I'm testing Next15 and I found the compiler complains about the typing of the API route handler:
Have you noticed the same thing in your environment? I don't know why Next wants us to use a weak typing ... |
Oh, I think it requires the type of the second parameter to be entirely a promise now. I'll make a change. |
Fixed in 2.7.4 |
@ymc9 Thank you for taking over. I was just wondering what would be the compatibility for users using Zenstack pre-Next.js 15, but as long as it works, that's perfect. Looking forward to seeing this in the release! |
Uh oh!
There was an error while loading. Please reload this page.
I'm using the latest
@zenstackhq/server/next
package, which exports theNextRequestHandler
.I get this error while running the server:
Probably NextRequestHandler should be updated to await the
params
props before being accessed. AFAIK, I couldn't find a way to await it myself.The text was updated successfully, but these errors were encountered: