title: How to fix "Cannot set property 'bindCallback' of undefined" in Ionic?
body: <p>I'm trying to create an ionic-3 application that uses google firestore as a database, but I keep getting errors.</p>
  
  <p>I used to get the <code>TypeError: Object(...) is not a function</code>, which after some googling I tried to remedy by installing rsjs and rsjs-compat. Now I get the <code>Cannot set property 'bindCallback' of undefined</code>, even when I remove all of the references to firebase and rsjx in my code.</p>
  
  <p>I have also tried various permutations of import <code>{ Observable } from 'rxjs/Observable'</code> and <code>import { Observable } from 'rxjs'</code>, but neither of these fix the issue.</p>
  
  <p>My package versions are:
  (global)</p>
  
  <ul>
  <li>@angular/cli@7.1.3</li>
  <li>cordova@8.1.2</li>
  <li>ionic@4.5.0</li>
  <li>n@2.1.12</li>
  </ul>
  
  <p>(not-global)</p>
  
  <ul>
  <li>@angular/core@5.2.11</li>
  <li>typescript@2.6.2</li>
  <li>@angular/fire@5.1.1</li>
  <li>angularfire2@5.1.1</li>
  <li>firebase@5.7.1</li>
  <li>rxjs@6.0.0</li>
  <li>rxjs@6.3.3</li>
  </ul>
  
  <p>Imports: </p>
  
  <ul>
  <li><p><code>import { Component, Injectable } from '@angular/core';</code></p></li>
  <li><p><code>import { IonicPage, NavController, NavParams } from 'ionic-angular';</code></p></li>
  <li><p><code>import { AngularFirestore } from 'angularfire2/firestore';</code></p></li>
  </ul>
  
  <p><code>import { Observable } from 'rxjs';</code></p>
  
  <pre><code>@IonicPage()
  @Component({
    selector: 'page-home',
    templateUrl: 'home.html',
  })
  export class HomePage {
  
    constructor(public navCtrl: NavController, public navParams: NavParams, private fireStore: AngularFirestore) {
        this.chatDoc = fireStore.doc('chats/test-chat')
    }
  
    ionViewDidLoad() {
      console.log('ionViewDidLoad HomePage');
    }
  
  }
  </code></pre>
  
  <p>Error from Ionic:</p>
  
  <p>Runtime Error</p>
  
  <pre><code>Cannot set property 'bindCallback' of undefined
  Stack
  TypeError: Cannot set property 'bindCallback' of undefined
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/vendor.js:154433:32)
  at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/vendor.js:152110:1)
  at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/vendor.js:49616:10)
  at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/vendor.js:152085:14)
  at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/vendor.js:48266:10)
  at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
  
  Ionic Framework: 3.9.2
  
  Ionic App Scripts: 3.2.1
  Angular Core: 5.2.11
  Angular Compiler CLI: 5.2.11
  Node: 10.14.2
  OS Platform: Windows 10
  Navigator Platform: Win32
  User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
  </code></pre>