# TypeError: Object(...) is not a function

**URL:** <https://forum.ionicframework.com/t/typeerror-object-is-not-a-function/130589>\
**Category:** Ionic Native\
**Created:** [May 15, 2018, 8:59pm UTC](https://forum.ionicframework.com/t/typeerror-object-is-not-a-function/130589 "2018-05-15T20:59:48Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![SamiKhan](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/samikhan/32/119040_2.png) [@SamiKhan](https://forum.ionicframework.com/u/SamiKhan)\
**Post date:** [June 13, 2018, 7:51am UTC](https://forum.ionicframework.com/t/typeerror-object-is-not-a-function/130589/6 "2018-06-13T07:51:00Z")

</div>

I found something that could help, I got the error with version rc.9 in angularfire2 so rolling back to rc.6 solved the error for me:  
I first uninstalled firebase and angularfire2 with:

npm uninstall firebase  
npm uninstall angularfire2

And then reinstalled again:

npm install angularfire2@5.0.0-rc.6  
npm install firebase

and If you find error : ERROR Class ‘FirebaseApp’ incorrectly implements interface ‘App’  
then add this line( automaticDataCollectionEnabled:boolean ) in this file.

\node\_modules\angularfire2\firebase.app.module.d.ts

correct file contents:  
import { InjectionToken } from ‘@angular/core’;  
import { FirebaseAppConfig } from ‘./’;  
import { FirebaseApp as FBApp } from ‘@firebase/app-types’;  
import { FirebaseAuth } from ‘@firebase/auth-types’;  
import { FirebaseDatabase } from ‘@firebase/database-types’;  
import { FirebaseMessaging } from ‘@firebase/messaging-types’;  
import { FirebaseStorage } from ‘@firebase/storage-types’;  
import { FirebaseFirestore } from ‘@firebase/firestore-types’;  
export declare const FirebaseAppConfigToken: InjectionToken;  
export declare class FirebaseApp implements FBApp {  
name: string;  
automaticDataCollectionEnabled:boolean  
options: {};  
auth: () =\> FirebaseAuth;  
database: () =\> FirebaseDatabase;  
messaging: () =\> FirebaseMessaging;  
storage: () =\> FirebaseStorage;  
delete: () =\> Promise;  
firestore: () =\> FirebaseFirestore;  
}  
export declare function \_firebaseAppFactory(config: FirebaseAppConfig, appName?: string): FirebaseApp;

---

_[View the full topic](https://forum.ionicframework.com/t/typeerror-object-is-not-a-function/130589)._
