node.js - MongoError : driver is incompatible with this server version

标签 node.js mongodb express node-mongodb-native mongoskin

我刚刚安装了 Mongo、Node 等,当我尝试通过我的 nodejs 服务器更新数据库时,我收到了这个错误:

MongoError: driver is incompatible with this server version

这是我拥有的版本:

我有所有东西的最新版本,我搜索了 node mongodb driver git了解what version of mongodb支持,但我找不到任何东西:(

我还阅读了有关它的其他 SO 问题,它说要更新您的 mongodb,但我的是最新版本!

有什么帮助吗?

最佳答案

我怀疑 the mongoskin peerDependency declaration指定 ~1.4 是您的问题。要确认,直接运行 npm install mongodb@latest 并编写一个测试文件,直接需要 mongodb 并连接并查询您的数据库。我怀疑这会很好,这将确认 mongoskin peerDependency 是问题所在。您可能需要向 mongoskin 提出问题并要求他们更新以支持 node-mongodb-native 的 2.x 版本。

关于node.js - MongoError : driver is incompatible with this server version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30362304/

相关文章:

javascript - Async Await Promise.all Array.map 未按预期运行。不知道为什么

javascript - 使用 Node.js 下载 Steroids.js

javascript - net.socket.setTimeout 不适用于 async.eachOfSeries

java - MongoDB 的 JMX 注册错误

mongoDB 连接结果

java - Node.js 套接字 read() 像 Java 一样?

node.js - Mongoose 中的排序无法正常工作

javascript - 如何在 Jade 中正确使用 JavaScript 处理渲染时传入的参数

node.js - 为什么中间件不能在 Express js 中工作

jquery - 快速路线注册 Ajax 返回 POST http ://localhost:3004/signup/404