question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatibility with `firebase` v9 and `@angular/fire` v7

See original GitHub issue

Just a heads-up that this package is not compatible with the latest versions of firebase (v9) and @angular/fire (v7), due to them introducing several breaking changes.

In the short term, making a package compatible with the latest versions of firebase and @angular/fire could be just a matter of updating the import paths.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ciriousjokercommented, Oct 6, 2021

The compatibility mode compiles properly.

node_modules/ngx-auth-firebaseui/fesm2015/ngx-auth-firebaseui.js

import { AngularFireAuth, AngularFireAuthModule } from '@angular/fire/compat/auth';
import { AngularFirestore, AngularFirestoreModule } from '@angular/fire/compat/firestore';

Obviously changing node_module files locally isn’t practical.


When trying to build the project it doesn't work though, here's the list of error messages:
./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:1966:33-67 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:1967:31-63 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:1968:30-57 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:1969:32-65 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:1970:31-63 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:1971:34-61 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:1972:30-57 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:4205:29-45 - Error: export 'FIREBASE_OPTIONS' (imported as 'FIREBASE_OPTIONS') was not found in '@angular/fire' (possible exports: VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAngularFireSchedulers, ɵZoneScheduler, ɵcacheInstance, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵkeepUnstableUntilFirstFactory, ɵmemoizeInstance, ɵzoneWrap)

./node_modules/ngx-auth-firebaseui/__ivy_ngcc__/fesm2015/ngx-auth-firebaseui.js:4209:29-46 - Error: export 'FIREBASE_APP_NAME' (imported as 'FIREBASE_APP_NAME') was not found in '@angular/fire' (possible exports: VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAngularFireSchedulers, ɵZoneScheduler, ɵcacheInstance, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵkeepUnstableUntilFirstFactory, ɵmemoizeInstance, ɵzoneWrap)

For the first few errors, I fixed similar errors by changing my imports from:

import firebase from 'firebase';

to

import * as firestore from 'firebase/firestore';
0reactions
AnthonyNahascommented, Feb 15, 2022

https://www.npmjs.com/package/ngx-auth-firebaseui v6 is now live

this is fixed now

thank you<3

Read more comments on GitHub >

github_iconTop Results From Across the Web

angularfire/version-7-upgrade.md at master - GitHub
AngularFire v7.0 has a compatibility layer that supports the AngularFire v6.0 ... In order to better support the tree-shakability introduced in Firebase v9 ......
Read more >
Upgrade to Angular/FIre V7 and Firebase V9 ... - Stack Overflow
I have an Ionic 5/Angular 12/Capacitor 3 mobile app that I am upgrading to Firebase 9 and Angular/Fire 7. Using the Angular/Fire upgrade ......
Read more >
Upgrade from version 8 to the modular Web SDK - Firebase
Compat - a familiar API surface which is fully compatible with the version 8 SDK, allowing you to upgrade to version 9 without...
Read more >
Firebase 9: A Breath of Fresh Air for the AngularFire App
In this tutorial, we will cover: Migration from AngularFire 6 to Angular 7 in compatibility mode; Migration strategy from compatibility mode to ...
Read more >
Angular 14 Firebase CRUD Tutorial With AngularFire 7
AngularFire provides a compatibility layer that will allow you to use the latest version of the library, while fully supporting the AngularFire v6.0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found