-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.2.7
-
Environment:Ubuntu
-
Empty show more show less
I have mongodb installed (^3.2.7) and I then install bson-ext to try to have better performance. But then, I have the the following error:
TypeError: First argument passed in must be an array of types at new Topology (node_modules/mongodb-core/lib/sdam/topology.js:134:29) at new NativeTopology (node_modules/mongodb/lib/topologies/native_topology.js:36:5) at createTopology (node_modules/mongodb/lib/operations/mongo_client_ops.js:400:16) ...
Il semble que ça vienne de cette ligne : dans /mongodb-core/blob/master/lib/sdam/topology.js#L134 :
// bson: options.bson || new BSON(),
alors que la doc de bson-ext demande les types
// Create a bson parser instance, passing in all the types // This is needed so the C++ parser has references to the classes and can // use them to serialize and deserialize the types. var bson = new BSON([ BSON.Binary, BSON.Code, BSON.DBRef, ... ]);