Ionic 2 Ioniclab Firebase Error

I keep getting this Runtime Error in Ionic Lab whenever I try to run it. I only use firebase.InitializeApp ONCE in app.component.ts. When I take it off, I get another error telling me I need one.

Error:

Error in ./MyApp class MyApp_Host - caused by: Firebase App named β€˜[DEFAULT]’ already exists.
Stack

Error: Firebase App named '[DEFAULT]' already exists.
        at Z (\C:\Users\treva\Documents\Apps\Almost2Donut\node_modules\firebase\app.js:27:331)
        at Object.initializeApp (\C:\Users\treva\Documents\Apps\Almost2Donut\node_modules\firebase\app.js:26:29)
        at new MyApp (\C:\Users\treva\Documents\Apps\Almost2Donut\src\app\app.component.ts:29:58)
        at new Wrapper_MyApp (/AppModule/MyApp/wrapper.ngfactory.js:7:18)
        at _View_MyApp_Host0.createInternal (/AppModule/MyApp/host.ngfactory.js:16:21)
        at _View_MyApp_Host0.AppView.create (\C:\Users\treva\Documents\Apps\Almost2Donut\node_modules\@angular\core\src\linker\view.js:98:21)
        at _View_MyApp_Host0.DebugAppView.create (\C:\Users\treva\Documents\Apps\Almost2Donut\node_modules\@angular\core\src\linker\view.js:308:44)
        at ComponentFactory.create (\C:\Users\treva\Documents\Apps\Almost2Donut\node_modules\@angular\core\src\linker\component_factory.js:157:36)
        at ViewContainerRef_.createComponent (\C:\Users\treva\Documents\Apps\Almost2Donut\node_modules\@angular\core\src\linker\view_container_ref.js:120:45)
        at IonicApp.ngOnInit (\C:\Users\treva\Documents\Apps\Almost2Donut\node_modules\ionic-angular\components\app\app-root.js:37:43)

Specs:
Ionic Framework: 2.0.0-rc.3
Ionic Native: 2.2.3
Ionic App Scripts: 0.0.45
Angular Core: 2.1.1
Angular Compiler CLI: 2.1.1
Node: 6.9.1
OS Platform: Windows 10
Navigator Platform: Win32

1 Like

same over here, if you solved it , please let me know how… thanks

I just happened to accidentally initialize firebase twice. Cant use Firebase SDK and AngularFire at once sadly

1 Like

oups, yeah, that makes sense, I found out my issue over here… i didnt include one of my providers in app.module… thanks mate :slight_smile:

1 Like