I have been struggling with this test, everything seems fine but the test does not pass, it keeps giving me this error ‘Model.deleteMany() no longer accepts a callback’ .
You have posted a link to the boiler plate, this is the same if I just opened it up myself. There needs to be a snapshot or a live URL.
How Can I Share My Workspace To Get Help?
You can create a snapshot of your workspace to generate a sharable URL you can use on our forum or our Discord, for example.
However, your snapshot WILL include your .env file, with any secret values you have written. Before generating a snapshot, you should move the secrets from the .env file to your user variables, which are not shared in your snapshot.
When I use Model.remove(), I get this error ‘[Error: Person.remove is not a function]’ and when I look up why I get this error, it says Mongoose v7+ no longer recognizes Model.remove() as a method and that I should instead use Model.deleteMany().
As @lasjorg said, it appears you installed a newer version of Mongoose rather than using versions of the dependencies in package.json. For that, you would need to delete your existing node_modules folder and run ‘npm install’ from the terminal. (I did this in VS Code on my local system.)
Yes, this is the correct way to post your repo. However this is what happens when I try to check the code with that link Remember to submit the Live App URL.