next-api-handler icon indicating copy to clipboard operation
next-api-handler copied to clipboard

Next.js 13 with app folder?

Open Nicolab opened this issue 3 years ago • 1 comments

Hello,

I have tested next-api-handler with Next 13 (app folder), but I have this error:

error - No HTTP methods exported in '/Users/nico/projects/example/src/app/api/auth/route.ts'. Export a named export for each HTTP method.

It's not compatible with Next.js 13 (app folder)?

Nicolab avatar Apr 24 '23 12:04 Nicolab

sorry atm its not supported atm, feel free to open a PR think its an easy tweak but there might be some api changes in Next 13 app folder api route in the future)

https://next-api-handler.vercel.app/docs/getting-started#compatibility-with-next-js-13-2-api-routes

howard86 avatar Apr 27 '23 16:04 howard86