0
我在0.12.X版本中使用Mongodb Native Driver For Node v2.1和一個節點應用程序。 我剛剛升級驅動程序到2.2版本,但我得到這個錯誤有一個簡單的插入:Node Mongodb Native Driver v 2.2是否仍然與節點0.12.X兼容?
/web-apps/j2ee/jenkins/back/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:320
self.s.pool = new Pool(Object.assign(self.s.options, options, {bson: this.s.
^
TypeError: undefined is not a function
at Server.connect (/web-apps/j2ee/jenkins/back/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:320:33)
at Server.connect (/web-apps/j2ee/jenkins/back/node_modules/mongodb/lib/server.js:328:17)
at open (/web-apps/j2ee/jenkins/back/node_modules/mongodb/lib/db.js:220:19)
at Db.open (/web-apps/j2ee/jenkins/back/node_modules/mongodb/lib/db.js:243:44)
at connectFunction (/web-apps/j2ee/jenkins/back/node_modules/mongodb/lib/mongo_client.js:220:67)
at connect (/web-apps/j2ee/jenkins/back/node_modules/mongodb/lib/mongo_client.js:367:5)
at Function.MongoClient.connect (/web-apps/j2ee/jenkins/back/node_modules/mongodb/lib/mongo_client.js:113:3)
at PriceInsert._write (/web-apps/j2ee/jenkins/back/src/helpers/price-insert-stream.js:34:21)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
的documentation for driver compatibility是不是最新的,因爲只有在2.1版本的要求。他們似乎使用與節點0.12.X不兼容的ES2015功能(Object.assign)。
我必須留在v 2.1嗎?