Getting error in Model.remove()

Getting the below error for the model.remove() challenge in MongoDB and Mongoose section
SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse ()
at /home/runner/boilerplate-mongomongoose/server.js:347:29
at /home/runner/boilerplate-mongomongoose/node_modules/mongoose/lib/model.js:4923:18

Your project link(s)

solution: https://replit.com/@gmkumaran87/boilerplate-mongomongoose

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36

Challenge: Delete Many Documents with model.remove()

Link to the challenge:

Use the mongodb and mongoose version as provided in the challenge. The Model.remove() is deprecated in newer versions.

so use the older versions. it should work

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.