-
Notifications
You must be signed in to change notification settings - Fork 33
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 13 (app folder) + nextcrud #53
Comments
Can be fixed with: export { handler as GET, handler as POST } if prisma 5 is supported |
Has anyone managed to get APP route to work? I tried exporting as GET, POST, etc. But it turns out that in the code next-crud tries to send the response itself via res.send(), but in NextJS 14 this no longer works, it expects to receive a JSON response from the Response constructor. |
Any update? It does not work on v14 too, I have 404 error |
Workaround is to not use the App folder for the API: use The rest of my code base is still in the |
Hello everybody Sorry for the delay. I have opened a PR to add compatibility with the App Dir #67 There is a bit of breaking changes for on the callbacks but overall it is working for both App and Page router |
@foyarash is it ready to use? |
Published on v4.0.0. Feel free to report any issue. |
I too am unable to get v4.0.0 of next-crud to fully work using the App Router. The GET requests work, but POST, PUT and DELETE all fail. From what I can tell, the problem seems to be centered around the |
I'm no expert, but here is a small PR that appears to fix the issue. |
Integration with Next 13 with app folder isn't possible, due to the conventions changing. The handler export is changed to GET, POST, PUT, DELETE, etc.
For next, syntax should probably be something like:
The text was updated successfully, but these errors were encountered: