Skip to content
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

BSON version issue #1534

Open
CookieBOY opened this issue May 18, 2023 · 2 comments
Open

BSON version issue #1534

CookieBOY opened this issue May 18, 2023 · 2 comments

Comments

@CookieBOY
Copy link

Not compatible with the latest version of mongodb please upgrade the package i am facing the issue of
BSONVersionError: Unsupported BSON version, bson types must be from bson 5.0 or later

these are the current dependency of latest agenda
"agenda": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/agenda/-/agenda-5.0.0.tgz",
"integrity": "sha512-jOoa7PvARpst/y2PI8h0wph4NmcjYJ/4wzFhQcHUbNgN+Hte/9h/MzKE0ZmHfIwdsSlnv3rhbBQ3Zd/gwFkThg==",
"requires": {
"cron-parser": "^3.5.0",
"date.js": "~0.3.3",
"debug": "~4.3.4",
"human-interval": "~2.0.1",
"moment-timezone": "~0.5.37",
"mongodb": "^4.11.0"
},
"dependencies": {
"bson": {
"version": "4.7.2",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz",
"integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==",
"requires": {
"buffer": "^5.6.0"
}
},
"mongodb": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.16.0.tgz",
"integrity": "sha512-0EB113Fsucaq1wsY0dOhi1fmZOwFtLOtteQkiqOXGklvWMnSH3g2QS53f0KTP+/6qOkuoXE2JksubSZNmxeI+g==",
"requires": {
"@aws-sdk/credential-providers": "^3.186.0",
"bson": "^4.7.2",
"mongodb-connection-string-url": "^2.5.4",
"saslprep": "^1.0.3",
"socks": "^2.7.1"
}
}
}
}

@sebamarynissen
Copy link

sebamarynissen commented Aug 2, 2023

See #1547, allthough it looks to me as if this specific problem is somewhere else in your code and not specifically related to agenda. In other words, even if agenda provided support for mongodb@5, you will probably still see this error message.

I've experienced a similar error as yours when using mongoose@6 ObejctId's - which still uses bson@4 - with the new mongodb@5 driver. You can't use bson@4 ObjectId's with mongodb@5 and vice versa. If you use mongoose, I would suggest upgrading it to version 7.

@misaelabanto
Copy link

Agenda still uses mongodb@4 and there is no new upgrades.

This is the output when I run pnpm why bson:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants