0

I am a newbee of Apostrophe-cms. I am trying to edit my project with apostrophe-cms version 0.5. When install a new apostrophe project, I got this error then run command: node app.js.

MongoError: driver is incompatible with this server version 
at Object.toError (/Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/utils.js:114:11) 
at __executeInsertCommand(/Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/db.js:1926:27) 
at Db._executeInsertCommand 
    (/Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/db.js:2028:5) 
at /Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/db.js:1348:12 
at /Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/db.js:1442:20 
at /Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/db.js:1196:16 
at /Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/db.js:1905:9 
at Server.Base._callHandler (/Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/connection/base.js:453:41) 

at /Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/connection/server.js:488:18 

at MongoReply.parseBody (/Users/alvisstran/Desktop/websiteGar/apostrophe-sandbox/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)

These are packages which I installed: - node: v6.2.1 - Homebrew 1.1.10 - mongodb: v3.0.12 - npm: v4.1.2

I think I installed wrong version of mongodb. I also tried to install mongodb: npm install mongod@1.3.0 or npm install mongod@2.0.0

I still got the same error

Please help to give me some hints how to solve this problem.

Thank you.

1 Answers1

0

I am the architect of Apostrophe at P'unk Avenue.

If you are a first-time Apostrophe developer, please do not use Apostrophe 0.5. That version is deprecated for new work.

Apostrophe 0.5 depends on an older version of the MongoDB driver, which cannot talk to certain newer versions of MongoDB. For our legacy projects, we pair it with MongoDB 2.6, which is receiving security patches so far in Red Hat Enterprise Linux and EPEL.

But don't do that! Use Apostrophe 2.x. It is superior in every conceivable way.

Hope this is helpful!

Tom Boutell
  • 7,281
  • 1
  • 26
  • 23
  • Thanks boutell. However, I working on the exist project and this project is using Apostrophe 0.5. So I really want to set up an local environment suitable for version 0.5 to test. – Alviss Tran Mar 01 '17 at 22:20
  • You should upgrade, it is 100% worth it. I recognize that will take time and energy though. – Tom Boutell Mar 02 '17 at 20:21
  • So in the meantime, run MongoDB 2.6. To do that safely, get it via running CentOS Linux and the EPEL repository, which is, so far, still backporting fixes. – Tom Boutell Mar 02 '17 at 20:22