Skip to content

angularfire2 5.0.0-rc-6.0 compatibility with firebase 4.13.1 #1576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rezamohamed opened this issue Apr 22, 2018 · 19 comments
Closed

angularfire2 5.0.0-rc-6.0 compatibility with firebase 4.13.1 #1576

rezamohamed opened this issue Apr 22, 2018 · 19 comments

Comments

@rezamohamed
Copy link

angularfire2 documentation has the following installation statement.

  npm install firebase angularfire2 --save

By default, this installs angularfire2 5.0.0-rc-6.0 and firebase 4.13.1.

When using firebase in a component

   import * as firebase from 'firebase';

I get the following error message on ng build/ng serve:

ERROR in node_modules/angularfire2/firebase.app.module.d.ts(10,22): error TS2420: Class 'FirebaseApp' incorrectly implements interface 'FirebaseApp'.
Property 'automaticDataCollectionEnabled' is missing in type 'FirebaseApp'.

SOLUTION: install firebase 4.12.1 - the error message does not show with this version.

@estrellajm
Copy link
Contributor

Looks like they're working on the resolving this with #1572.

Add the line "automaticDataCollectionEnabled: boolean;" to the firebase.app.module.d.ts. ensure you have "@firebase/app" as well

Got the solution from Elizabeth

@opiepj
Copy link

opiepj commented Apr 23, 2018

@estrellajm when would this get resolved?

@estrellajm
Copy link
Contributor

Thanks a question for @jamesdaniels James Can you help?

It looks like it's been merged. #1572.

@jamesdaniels
Copy link
Member

Sorry been out of office, will cut a release tomorrow.

@manimani1014
Copy link

@jamesdaniels
We are waiting for your update(release).

@estrellajm
Copy link
Contributor

estrellajm commented Apr 25, 2018 via email

@JoseASolis
Copy link

This new version of AngularFire (v5) does include a Messaging Module? I had the same issue that the OP, but then I installed @angular/app and then i got another error : "ERROR TypeError: firebase.messaging is not a function"

@uloga
Copy link

uloga commented Apr 26, 2018

ERR: Property 'automaticDataCollectionEnabled' is missing in type 'FirebaseApp'.

just add "automaticDataCollectionEnabled: boolean;" to FirebaseApp interface in file: firebase.app.module.d.ts located in your firebase node_modules

    automaticDataCollectionEnabled: boolean;
export declare class FirebaseApp implements FBApp {
    automaticDataCollectionEnabled: boolean; // add this line
    name: string;
    options: {};
    auth: () => FirebaseAuth;
    database: () => FirebaseDatabase;
    messaging: () => FirebaseMessaging;
    storage: () => FirebaseStorage;
    delete: () => Promise<any>;
    firestore: () => FirebaseFirestore;
}

@jmarbutt
Copy link

It seems this is not fixed in the release. Any ideas of when it will be fixed?

@b-mi
Copy link

b-mi commented Apr 28, 2018

After adding automaticDataCollectionEnabled: boolean;

these errors:
ERROR in ./node_modules/angularfire2/database/database.module.js
Module not found: Error: Can't resolve '@firebase/database' in 'C:\Users\aaa\node_modules\angularfire2\database'
ERROR in ./node_modules/angularfire2/firestore/firestore.module.js
Module not found: Error: Can't resolve '@firebase/firestore' in 'C:\Users\aaa\node_modules\angularfire2\firestore'

.... but helped deleting firebase folders from node_modules and npm install

@gfaganli
Copy link

  1. npm uninstall firebase
  2. npm clean cache --force
  3. npm install [email protected]
    That one solves problem without manually editing node-modules.

@renansigolo
Copy link
Contributor

As the fix as already been committed at f2cf159 is there any date scheduled for a proper release of a new version?

@talbronfer
Copy link

Can you please close this PR so we can solve the problem? It's really a small fix and would really help. Thanks.

@andregomars
Copy link

Please fix it asap

@EdricChan03
Copy link
Contributor

Any updates? I have an app that has the @next version of angularfire2, as well as firebase version 4.13.1. Please fix ASAP.

@rwmb
Copy link

rwmb commented Apr 30, 2018

Also waiting for the fix, we shouldn't be making edits to packages like that.

@jamesdaniels
Copy link
Member

jamesdaniels commented Apr 30, 2018 via email

@shanehsu
Copy link

shanehsu commented May 2, 2018

We're having problem with the example in authentication where

import * as firebase from 'firebase'

is using 4.13.1 and AngularFire2 is using another app of 4.11.0.

Does AngularFire work as a firebase replacement? Or does it load a version of firebase on its own?

@jamesdaniels
Copy link
Member

jamesdaniels commented May 4, 2018

FYI rc7 was just released, which addresses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests