title: MongoDB Node JS : MongoServerSelectionError
body: <p>I'm new with <code>mongoDB</code> and <code>NodeJS</code> and I have this error on my Raspberry Pi. However, I don't have any error while running it on Ubuntu.</p>
  
  <p>Here is my code : </p>
  
  <pre><code>var MongoClient = require("mongodb").MongoClient;
  MongoClient.connect("mongodb://localhost/logs",{useUnifiedTopology : true},function(error,db) {
      if(error) throw(error);
      console.log("connected");
  });
  </code></pre>
  
  <p>And here is the error I got:</p>
  
  <pre><code>MongoServerSelectionError: Server at localhost:27017 reports maximum wire version 0, but this version of the Node.js Driver requires at least 2 (MongoDB 2.6)
      at Timeout.waitQueueMember.timer.setTimeout [as _onTimeout] (/home/pi/monitoring/node_modules/mongodb/lib/core/sdam/topology.js:448:30)
      at ontimeout (timers.js:436:11)
      at tryOnTimeout (timers.js:300:5)
      at listOnTimeout (timers.js:263:5)
      at Timer.processTimers (timers.js:223:10)
  </code></pre>
  
  <p>Does anyone knows how to solve the version problem?
  Thanks</p>