Open SNAILTHELAZY opened 3 years ago
I'm seeing exactly the same thing. I've tried every combination of clearing out, re-installing, making sure dependencies are there, installing through ng and npm. Same results as above.
Yep, I get the same thing. The demo
project won't compile on its own. Needs modification so that it will compile out of the box.
I was facing the same issue, this compilation error disappeared after I changed it to "@angular/fire": "^5.1.0".
I changed it to this version based on the library package.json file.
But still following the demo is not enough to make it work for me, the console logs this error for me
Error: Token InjectionToken angularfire2.app.nameOrConfig is missing a ɵprov definition.
at injectableDefOrInjectorDefFactory (core.js:17278)
at providerToFactory (core.js:17385)
at providerToRecord (core.js:17332)
at R3Injector.processProvider (core.js:17148)
at core.js:17109
at core.js:1400
at Array.forEach (<anonymous>)
at deepForEach (core.js:1400)
at R3Injector.processInjectorType (core.js:17105)
at core.js:16864
in the root module I added NgbAuthFirebaseUIModule.forRoot(environment.firebase)
to the imports list.
where environment.firebase
points to my firebase project config
firebase: {
apiKey: string;
authDomain: string;
databaseURL: string;
projectId: string;
storageBucket: string;
messagingSenderId: string;
}
I have faced the same issue with angular 10, but unfortunately, I cannot update to 11 because of missing dependencies. So, I have tried to turn off Ivy and it works. I hope my dependency issues will be resolved soon, but the following workaround solved the mentioned issue for me: tsconfig.json:
"angularCompilerOptions": {
"enableIvy": false
}
Same problem here. I have tried the solutions proposed but it still not working.
Bug Report or Feature Request (mark with an
x
)OS and Version?
Ubuntu 20.04, linux x64
Versions
Angular CLI: 10.0.7 Node:14.15.0 "@angular/animations": "^10.0.14", "@angular/common": "~10.0.11", "@angular/compiler": "~10.0.11", "@angular/core": "~10.0.11", "@angular/fire": "^6.0.4-canary.9a26fbe", "@angular/forms": "^10.0.14", "@angular/platform-browser": "~10.0.11", "@angular/platform-browser-dynamic": "~10.0.11", "@angular/router": "~10.0.11", "@firebaseui/ng-bootstrap": "^0.4.1", "@ng-bootstrap/ng-bootstrap": "^8.0.0", "bootstrap": "^4.5.3", "firebase": "^8.0.2", "font-awesome": "^4.7.0", "rxjs": "~6.5.5", "tslib": "^2.0.0", "zone.js": "~0.10.3"
The log given by the failure
Logging in the terminal
Desired functionality
Able to use the firebaseui with google login
Mention any other details that might be useful
import { AppComponent } from './app.component';
import { AngularFireModule } from '@angular/fire'; import { environment } from '../environments/environment'; import {AngularFireAuthModule} from '@angular/fire/auth';
import {NgbAuthFirebaseUIModule} from '@firebaseui/ng-bootstrap';
@NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, AngularFireModule.initializeApp(environment.firebase), NgbAuthFirebaseUIModule.forRoot(environment.firebase), AngularFireAuthModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
import { Component } from '@angular/core'; import {OnInit} from '@angular/core'; import {AuthProvider} from '@firebaseui/ng-bootstrap'; import {AngularFireAuth} from '@angular/fire/auth'; import firebase from 'firebase/app';
@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'firebaseui-bootstrap';
providers=AuthProvider;
ngOnInit(){}
printUser(event){ console.log(event); }
printError(event){ console.error(event); } }
<ngb-auth-firebaseui [providers]="[providers.Google]" (onSuccess)="printUser($event)" (onError)="printError()">