title: How to set up Rxdb with pouchdb-adapter-leveldb?
body: <p>I am working on electron app and I am using react,react-redux. Now I am trying to set up Rxdb and pouchdb-adapter-leveldb for offline mode, I took Rxdb(react) - example and made little changes for pouchdb-adapter-leveldb. this is my database.js file:</p>
  
  <pre><code>import * as RxDB from 'rxdb';
  
  var PouchDB = require('pouchdb-core')
      .plugin(require('pouchdb-adapter-leveldb'));
  RxDB.plugin(require('pouchdb-adapter-leveldb'));
  
  const collections = [
      {
          name: 'heroes',
          schema: require('./Schema.js').default,
          methods: {
              hpPercent() {
                  return this.hp / this.maxHP * 100;
              }
          },
          sync: true
      }
  ];
  
  const syncURL = 'http://localhost:3000/teams';
  console.log('host: ' + syncURL);
  // const syncURL = host;
  
  let dbPromise = null;
  
  const _create = async function() {
  
  
      console.log('DatabaseService: creating database..');
  
      const db = await RxDB.create({name: 'heroesreactdb', adapter: 'leveldb', password: 'myLongAndStupidPassword'});
      console.log('DatabaseService: created database');
      window['db'] = db; // write to window for debugging
  
      // show leadership in title
      db.waitForLeadership().then(() =&gt; {
          console.log('isLeader now');
          document.title = '♛ ' + document.title;
      });
  
      // create collections
      console.log('DatabaseService: create collections');
      await Promise.all(collections.map(colData =&gt; db.collection(colData)));
  
      // hooks
      console.log('DatabaseService: add hooks');
      db.collections.heroes.preInsert(function(docObj) {
          const color = docObj.color;
          return db.collections.heroes.findOne({color}).exec().then(has =&gt; {
              if (has != null) {
                  alert('another hero already has the color ' + color);
                  throw new Error('color already there');
              }
              return db;
          });
      });
  
      // sync
      console.log('DatabaseService: sync');
      collections.filter(col =&gt; col.sync).map(col =&gt; col.name).map(colName =&gt; db[colName].sync({
          remote: syncURL + colName + '/'
      }));
  
      return db;
  };
  
  export function get() {
      if (!dbPromise)
          dbPromise = _create();
      return dbPromise;
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ZhYb8.png" rel="nofollow noreferrer">![and this is my error notification:
  ]<a href="https://i.stack.imgur.com/ZhYb8.png" rel="nofollow noreferrer">1</a></a></p>
  
  <p>when I saw this error message, I delete nod-modules, and install node-bindings (One guy suggested this solution) but it did't work for me. Any idea how to fix this :? :/ thanks!!!</p>