Beware: This post was published 3 years ago and its content may be outdated.
#14448

Did you ever encountered this message when working with Mongoose?

VersionError: No matching document found.

This is a good explanation about version control in Mongoose, what it is and why it is useful.

If you are inserting content into the database with MongoDB driver and updating it using Mongoose, be careful! __v won’t be set and if any of your document attributes is an array you can get easily in trouble.