skip to Main Content

Mongodb – finOne() in mongoose fails with MongoServerError: Expected field collationto be of type object

I am trying to implement a simple registration validation using express and MongoDb but the below line of code always fails with the below error const emailExist = await User.findOne({email: req.body.email}); The Error _node_modulesmongodblibcmapconnection.js:203 callback(new error_1.MongoServerError(document)) ^ MongoServerError: Expected field…

VIEW QUESTION
Back To Top
Search