New version 5.11.0 error for mongoose

The new version 5.11.0 has removed some of the methods of mongoose. We are getting an error as we have put “mongoose”: “^5.9.21” in package.json. We had to modify it to “mongoose”: “~5.9.21” to make it run.

Please look into this issue. As many developers will face the same.

Welcome to the MongoDB community @Sumit_De!

For Mongoose bug reports you are best going directly to the Mongoose GitHub repo.

If a Mongoose upgrade introduces breaking changes, I suggest:

If you’ve encountered what appears to be an unexpected regression, you can create a new GitHub issue for the maintainer to investigate.

If you do create a GitHub issue (or find a resolution for your challenges after upgrading to Mongoose 5.11.0), it would be helpful to comment here in case others encounter the same problem.