-
Type: Bug
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: BSON
What problem are you facing?
If you have a package with a dependency on `bson` and a host package that also has a dependency on `bson`, and you try and compare `ObjectId` classes using the `equals` method you get a very vague message like below.
```
TypeError: Cannot read properties of undefined (reading '11')
```
What driver and relevant dependency versions are you using?
using bson package version 6.2.0
Steps to reproduce?
i made a super simple github repo that reproduces this issue, see readme about how to run it.
- duplicates
-
NODE-5873 js-bson - PR #643: fix: use Symbol.for('id') in ObjectId to fix errors when mixing cjs and mjs
- Closed
- is related to
-
NODE-6443 instanceof checks don't work when mongodb and bson are used together in ESM project
- Blocked
- related to
-
NODE-5756 ObjectId instances created by bson and mongodb are not interchangeable
- Closed