Next.js 15: Type "FetchEventLike" is not a valid type for the function's second argument.
#3548
Labels
Type "FetchEventLike" is not a valid type for the function's second argument.
#3548
What version of Hono are you using?
4.6.5
What runtime/platform is your app running on?
Node/Vercel
What steps can reproduce the bug?
☝️ The above error occurs when upgrading to Next.js 15. This, of course, uses
hono/vercel
's handler with the Route Handler convention. Example:Like the error indicates, it has to do with the
FetchEventLike
type from Hono:hono/src/adapter/vercel/handler.ts
Lines 5 to 9 in 3d8abbc
I don't know if simply removing the
requestContext
argument along with its type is sufficient, but when I remove it locally and try to build all seems to work just fine. I don't see anything in the Route Handlers documentation that says it can't be removed, but I defer to the maintainers.What is the expected behavior?
No response
What do you see instead?
No response
Additional information
I'm using this in a monorepo context, for clarity, but I don't think that's relevant for this specific error.
The text was updated successfully, but these errors were encountered: