title: Unable to sync RxDB with couchdb on react-native after creating collections
body: <p>Why would rxdb throw this error when try to connect/sync on couch server <code>Error Sync: TypeError: undefined is not an object (evaluating 'db.todos.syncCouchDB')</code></p>
  <p>I tested the same function on my web app and works perfectly.
  By the way I'm using it on android physical device and an iOS emulator.</p>
  <pre class="lang-js prettyprint-override"><code> try {
         //syncing...
         db.todos.syncCouchDB({
          remote: 'http://admin:somepassword@127.0.0.1:5984/itony_todo_app',
           options: {
             live: true,
             retry: true,
           },
         });
       } catch (error) {
        console.log(`Error Sync: ${error}`);
        throw error;
      }
  </code></pre>
  <p>My whole database init file is as follows:</p>
  <pre class="lang-js prettyprint-override"><code>import {createRxDatabase} from 'rxdb';
  import {addPouchPlugin, getRxStoragePouch} from 'rxdb/plugins/pouchdb';
  import SQLite from 'react-native-sqlite-2';
  import SQLiteAdapterFactory from 'pouchdb-adapter-react-native-sqlite';
  import {RxTodoDatabase, todoSchema} from './src/schema/todo';
  
  const SQLiteAdapter = SQLiteAdapterFactory(SQLite);
  
  addPouchPlugin(SQLiteAdapter);
  addPouchPlugin(require('pouchdb-adapter-http'));
  
  async function _create(): Promise&lt;RxTodoDatabase&gt; {
    let db;
    try {
      console.log(`Creating Database`);
      db = await createRxDatabase&lt;RxTodoDatabase&gt;({
        name: 'itony_todo_app',
        storage: getRxStoragePouch('react-native-sqlite'),
        password: 'mystupidlongpassword',
        multiInstance: false,
        ignoreDuplicate: true,
      });
    } catch (err) {
      console.log(`Error Creating database: ${err}`);
      throw err;
    }
  
    try {
      //adding collections
      console.log('adding collections');
      (await db).addCollections({
        todos: {
          schema: todoSchema,
  
        },
      });
    } catch (error) {
      console.log(`Error adding collections: ${error}`);
      throw error;
    }
  
    try {
      //syncing...
      db.todos.syncCouchDB({
        remote: 'http://admin:213580@127.0.0.1:5984/itony_todo_app',
        options: {
          live: true,
          retry: true,
        },
      });
    } catch (error) {
      console.log(`Error Sync: ${error}`);
      throw error;
    }
  
    console.log('Database initiated...');
    return db;
  }
  
  const DatabaseService = {
    DB_CREATE_PROMISE: _create(),
    get(): Promise&lt;RxTodoDatabase&gt; {
      return this.DB_CREATE_PROMISE;
    },
  };
  
  export default DatabaseService;
  </code></pre>
  <p>my package.json is as follows maybe I'm missing something, I don't know, maybe there's a certain package missing...</p>
  <pre class="lang-json prettyprint-override"><code>  &quot;dependencies&quot;: {
      &quot;base-64&quot;: &quot;^1.0.0&quot;,
      &quot;events&quot;: &quot;^3.3.0&quot;,
      &quot;pouchdb-adapter-http&quot;: &quot;^7.2.2&quot;,
      &quot;pouchdb-adapter-react-native-sqlite&quot;: &quot;^3.0.1&quot;,
      &quot;react&quot;: &quot;17.0.2&quot;,
      &quot;react-native&quot;: &quot;0.68.0&quot;,
      &quot;react-native-get-random-values&quot;: &quot;^1.7.2&quot;,
      &quot;react-native-sqlite-2&quot;: &quot;^3.5.2&quot;,
      &quot;rxdb&quot;: &quot;^11.6.0&quot;,
      &quot;rxjs&quot;: &quot;^7.5.5&quot;,
      &quot;uuid&quot;: &quot;^8.3.2&quot;
    }
  </code></pre>