-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported BSON version, bson types must be from bson 5.0 or later when used with mongoose 7.0.0 #349
Comments
Please, let me know if you need any further information to help you solve this bug |
I dont have a solution to it but, I had updated my mongo server which cleared my DB and collections, as soon as imported them again the error went away. |
So, it means it could be that my mongo server is obsolete. Interesting! I will try upgrading and see how it goes. |
I faced the same error second time again, this was due to using an older version of mongoose(5.1.1) to create a new Objectid, updating it to v 7.0.3 resolved the issue. If someone could explain why does this error occur that would be awesome. All the best |
I'm having the same problem. Followed @KDDeveloper 's suggestion and now I'm just getting "null" for ids. I'm using GraphQL and most of the time it's smart enough to convert _id to id, but now I have to do it manually. I also had to upgrade to MongoDB 6.0 to fix the BSON types error. Deleting and re-adding collections did not fix the issue. |
I was able to work-around this issue by forcing newer BSON and mongodb versions using this in my project's package.json file: |
work around:
I will try to fix it with a PR. |
Reproduce Bug
In order to reproduce this bug, use mongo-cursor-pagination (8.1.2 or 8.1.3) with mongoose (7.0.0).
The error occurs whenever next page query is added to paginate function.
The text was updated successfully, but these errors were encountered: