angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.69k stars 2.19k forks source link

Module '"firebase/app"' has no exported member 'auth' #3100

Open soundstage opened 2 years ago

soundstage commented 2 years ago

Version info

Angular: ~12.2.0

Firebase: ^9.6.1

AngularFire: ^7.2.0

Other (e.g. Ionic/Cordova, Node, browser, operating system):

How to reproduce these conditions

Failing test unit, Stackblitz demonstrating the problem

Steps to set up and reproduce Importing import { auth } from 'firebase/app'; in a service.ts file throws this error rendering the app unstable.

Sample data and security rules

Debug output

Errors in the JavaScript console

Output from firebase.database().enableLogging(true);

Screenshots

Expected behavior

Actual behavior

patricsteiner commented 2 years ago

since the new version 7 you need to import from firebase/compat: import { auth } from 'firebase/compat/app';

Santoshah commented 2 years ago

since the new version 7 you need to import from firebase/compat: import { auth } from 'firebase/compat/app';

I think its new version 9 where we need to add compat.