-1

I updated my computer to High Sierra (clean install), after reinstall the angular-cli, and clone one of my previous project that uses Firebase and angularfirebase2 any operation of get data from firebase is not working. I got the following error:

Uncaught TypeError: Object(...) is not a function
    at SwitchMapSubscriber.eval [as project] (changes.js:7)
    at SwitchMapSubscriber._next (switchMap.js:91)
    at SwitchMapSubscriber.Subscriber.next (Subscriber.js:95)
    at RefCountSubscriber.Subscriber._next (Subscriber.js:131)
    at RefCountSubscriber.Subscriber.next (Subscriber.js:95)
    at Subject.next (Subject.js:56)
    at ConnectableSubscriber.Subscriber._next (Subscriber.js:131)
    at ConnectableSubscriber.Subscriber.next (Subscriber.js:95)
    at Notification.observe (Notification.js:32)
    at AsyncAction.DelaySubscriber.dispatch (delay.js:91)

Does anyone knows what is happening? The project is on angular 5

Jacobo
  • 1,259
  • 2
  • 19
  • 43
  • Possible duplicate of ["ERROR TypeError: Object(...) is not a function" using AngularFirestore and firebase](https://stackoverflow.com/questions/50374194/error-typeerror-object-is-not-a-function-using-angularfirestore-and-fire) – James Daniels May 18 '18 at 21:50

2 Answers2

1

AngularFire maintainer here. You'll want to upgrade to rxjs 6, we've moved over to support Angular 6. Since you're using Angular 5 install the rxjs-compat lib to smooth over the changes until you migrate.

James Daniels
  • 6,883
  • 4
  • 24
  • 28
0

It was a problem with firebase and angularfire.

I solved it with the following commands.

npm uninstall angularfire2
npm install angularfire2@5.0.0-rc.3 --save
npm uninstall firebase
npm install firebase@4.8.0 --save
Jacobo
  • 1,259
  • 2
  • 19
  • 43
  • pinning to an already six month old version of the library is not a good solution, please just upgrade your dependencies – James Daniels May 18 '18 at 21:45