Tell us what’s happening:
The listed solution that is copied and pasted isn’t even working. At this point I’m starting to think it’s not my fault.
I’m getting:
(node:2611) [MONGODB DRIVER] Warning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse ()
at /home/runner/boilerplate-mongomongoose/server.js:346:29
at /home/runner/boilerplate-mongomongoose/node_modules/mongoose/lib/model.js:4994:18
For anyone who runs in to this problem, you have to put mongoose first and mongodb second in the package.json at least for replit. It autoupdated the mongoose version when I put mongodb as a dependency first.