Skip to content
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

Problem with findByIdAndRemove in mongoose 8.0.0 #71

Open
Amir-Kermanshahani opened this issue Nov 2, 2023 · 1 comment
Open

Problem with findByIdAndRemove in mongoose 8.0.0 #71

Amir-Kermanshahani opened this issue Nov 2, 2023 · 1 comment

Comments

@Amir-Kermanshahani
Copy link

If you installed Mongoose v8.0.0, you'll hit an error on prompt deletion.
The problem is that in Mongoose v8.0.0, the "findByIdAndRemove" query is replaced with "findByIdAndDelete".
you can check the version of Mongoose and if you were using this version, just replace it as I said in the "app/api/prompt/[id]/route.js" file.

@mattsnow
Copy link

Thanks Amir, facing this exact same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants