Unsupported BSON version, bson types must be from bson 5.0 or later

707 views
Skip to first unread message

Mohd Mudassir Alam

unread,
Apr 25, 2023, 7:51:50 AM4/25/23
to Mongoose Node.JS ODM
i installed mongoose v7.x and it is using dependencies bson@^5.0.1:
  version "5.2.0"

and i am getting this error

 Unsupported BSON version, bson types must be from bson 5.0 or later
at serializeInto (/app/node_modules/mongodb/node_modules/bson/lib/bson.cjs:3637:23)
at serializeObject (/app/node_modules/mongodb/node_modules/bson/lib/bson.cjs:3199:22)
at serializeInto (/app/node_modules/mongodb/node_modules/bson/lib/bson.cjs:3432:25)
at serializeObject (/app/node_modules/mongodb/node_modules/bson/lib/bson.cjs:3199:22)
at serializeInto (/app/node_modules/mongodb/node_modules/bson/lib/bson.cjs:3633:25)
at Object.serialize (/app/node_modules/mongodb/node_modules/bson/lib/bson.cjs:4015:32)
at Msg.serializeBson (/app/node_modules/mongodb/lib/cmap/commands.js:383:21)
at Msg.makeDocumentSegment (/app/node_modules/mongodb/lib/cmap/commands.js:377:37)
at Msg.toBin (/app/node_modules/mongodb/lib/cmap/commands.js:366:29)
at MessageStream.writeCommand (/app/node_modules/mongodb/lib/cmap/message_stream.js:43:34)
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);

any solution for this? 
Reply all
Reply to author
Forward
0 new messages