title: Cannot read property 'db' of null javascript with parcel
body: <p>I tried to set up a mongodb system with my openlayers map, but it is not working : Uncaught TypeError: Cannot read property 'db' of null. My part of code about mongodb is : </p>
  
  <pre><code>    var MongoClient = require('mongodb').MongoClient;
      var url = "mongodb://localhost:27017/";
      MongoClient.connect(url, function(err, db) {
              var tapDB = db.db("tapDB"); //&lt;-- here is the error
  
  
  })
  </code></pre>
  
  <p>I suppose that this error is maybe because i am using npm start instear of node server.js, but I am not sure because i am a newbie. Mongodb is started via the cmd by doing the following command :"mongod" and then mongo on an other cmd.</p>
  
  <p><strong>UPDATE</strong>: For everyone having the same problem than me, i'd recommand deleting parcel. That's what I did and now it works fine</p>