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
[ERROR] Class 'FirebaseApp' incorrectly implements interface 'App' #1338
Comments
@oTTa Make sure you are on AngularFire 5.0.0-rc.3. You're likely on rc.0 and Firebase ^4.6.0 which are incompatible. |
Thanks @davideast |
Just to be super clear, the AngularFire 5.0.0-rc.3 is incompatible with any version of firebase greater than 4.6.0 (which technically would be an incompatibility change resulting in Firebase 5.0.0 but I digress). A working solution is to edit the package.json file and make sure the config is as follows Then simply running |
PivitParkour94... I could cry.... I was about to give up until I saw this comment! Another note to add... |
@markhoward02 after deleting node_module folder ..while performing npm cache clean it gives me error like this " G:\ion\shoplist>npm cache clean |
and after trying npm install it gives me this error |
@PivitParkour94 your solution work for me ..but it gives me other error in my project node_modules/angularfire2/database/index"' has no exported member 'FirebaseListObservable'. import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database'; |
Below versions fix this error for me
|
@androidovshchik .Thanks. |
@MichaelHuy |
I still have the Error:
So the fix of @androidovshchik didnt work in my case. Do u have an idea ? |
@yaseleylo123 hey, try this:
|
@victorvsantos
|
SOLVED:
|
import this: import firebase from 'firebase/app'; its work for me |
try this one. it might work for you. then run ionic serve |
updating the angularfire2 to next helped me
This has worked even without adding a There might be a warning about a future deprecation of dates (if you are using |
Just add the automaticDataCollectionEnabled property to the FirebaseApp class. export declare class FirebaseApp implements _FirebaseApp {
name: string;
options: {};
auth: () => FirebaseAuth;
database: (databaseURL?: string) => FirebaseDatabase;
messaging: () => FirebaseMessaging;
storage: (storageBucket?: string) => FirebaseStorage;
delete: () => Promise<void>;
firestore: () => FirebaseFirestore;
automaticDataCollectionEnabled: false; // <-- Add this line.
} |
@Ahkam95 solution works for me. |
@millbj92 Thanks man |
@millbj92 Thanks, It works. |
Hi everyone. |
It works now. But now have another error in app/app.module.ts; |
@asrar7 |
@souhailmerroun @Ahkam95 @millbj92 now i have this below problem |
@asrar7 did you add in providers in file app.module.ts ? |
@PivitParkour94 i could kiss you.. i have been dealing with this hell for 3 weeks now,,.. thank you mate. |
David, just had to upgrade firebase for firebase.firestore.FieldValue.increment and this issue is back. Using "angularfire2": "^5.2.1", "@firebase/app": "^0.4.6", "@firebase/firestore": "^1.4.1" and error message ERROR in node_modules/@angular/fire/firebase.app.module.d.ts(17,22): error TS2420: Class 'FirebaseApp' incorrectly implements interface 'App'. |
Fixed when run this command npm install firebase @angular/fire --save and this npm install -S firebase@latest |
[21:14:20] typescript: ...a/mobile/bahiadeportes-mobile/node_modules/angularfire2/firebase.app.module.d.ts, line: 12
Namespace 'firebase' has no exported member 'Promise'.
Error: Failed to transpile program
at new BuildError (\mobile\bahiadeportes-mobile\node_modules@ionic\app-scripts\dist\util\errors.js:16:28)
at \mobile\bahiadeportes-mobile\node_modules@ionic\app-scripts\dist\transpile.js:159:20
at Promise ()
at transpileWorker (\mobile\bahiadeportes-mobile\node_modules@ionic\app-scripts\dist\transpile.js:107:12)
at Object.transpile (\mobile\bahiadeportes-mobile\node_modules@ionic\app-scripts\dist\transpile.js:64:12)
at \mobile\bahiadeportes-mobile\node_modules@ionic\app-scripts\dist\build.js:109:82
at
[21:14:20] copy finished in 5.56 s
package.json
app.module.ts
import { AppVersion } from '@ionic-native/app-version';
import { Device } from '@ionic-native/device';
import { Network } from '@ionic-native/network';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { LoginPage } from '../pages/login/login';
import { RegistrarsePage } from '../pages/registrarse/registrarse';
import { NetworkService } from '../services/network.service';
import { SafeHttp } from '../services/safe-http.service';
import { ToastService } from '../services/toast.service';
import { UsuarioService } from '../services/usuario.service';
import { Configuration } from './app.constants';
@NgModule({
declarations: [
MyApp,
HomePage,
LoginPage,
RegistrarsePage,
],
imports: [
AngularFireModule.initializeApp(Configuration.FIREBASE_CONFIG),
AngularFireAuthModule,
BrowserModule,
HttpModule,
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot()
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
RegistrarsePage,
LoginPage,
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
{ provide: LOCALE_ID, useValue: "es-AR" },
UsuarioService,
NetworkService,
SafeHttp,
ToastService,
AppVersion,
Device,
Network,
]
})
export class AppModule {}
EXECUTE ionic serve -> same problem
The text was updated successfully, but these errors were encountered: