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.

Getting exception when using on Angular 6 project

See original GitHub issue

I installed this package on a new Angular6 project, and followed the installation instructions. My app.module.ts looks like this:

    ...
    AngularFireModule.initializeApp(environment.firebaseConfig),
    AngularFirestoreModule,
    AngularFireAuthModule,
    FirebaseUIModule.forRoot(firebaseUiAuthConfig)
],

However I am getting this exception:

ERROR Error: Uncaught (in promise): TypeError: firebase.initializeApp is not a function
TypeError: firebase.initializeApp is not a function
    at new cm (npm.js:340)
    at new FirebaseuiAngularLibraryService (firebaseui-angular.js:16)
    at FirebaseuiAngularLibraryService_Factory (firebaseui-angular.js:29)
    at _callFactory (core.js:9292)
    at _createProviderInstance$1 (core.js:9258)
    at resolveNgModuleDep (core.js:9236)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:9919)
    at resolveDep (core.js:10284)
    at createClass (core.js:10160)
    at createDirectiveInstance (core.js:10041)
    at new cm (npm.js:340)
    at new FirebaseuiAngularLibraryService (firebaseui-angular.js:16)
    at FirebaseuiAngularLibraryService_Factory (firebaseui-angular.js:29)
    at _callFactory (core.js:9292)
    at _createProviderInstance$1 (core.js:9258)
    at resolveNgModuleDep (core.js:9236)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:9919)
    at resolveDep (core.js:10284)
    at createClass (core.js:10160)
    at createDirectiveInstance (core.js:10041)
    at resolvePromise (zone.js:814)
    at resolvePromise (zone.js:771)
    at zone.js:873
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:4062)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
RaphaelJennicommented, May 13, 2018

This is a compatibility problem between firebase, firebaseui and angularfire2. They are already working on a fix. I will update the package as soon as the fix is released. For now, just downgrade firebaseui to a version prior to 3.0.0.

1reaction
RaphaelJennicommented, May 27, 2018

Version 3.0.0 is out now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Handling with Angular 6 - Tips and Best Practices - Rollbar
Using Angular's HttpClient along with catchError from RxJS, we can easily write a function to handle errors within each service.
Read more >
why it's throwing error while building the project in angular 6?
I am developing an application on Angular 6 & it's working fine on my local development environment but when I am trying to...
Read more >
ErrorHandler - Angular
The default implementation of ErrorHandler prints error messages to the console . To intercept error handling, write a custom exception handler that replaces ......
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
Many common build errors may occur as a result of rebuilding your app while using ng serve or running ng build or ng...
Read more >
Angular - Sentry Documentation
Sentry's SDKs enable automatic reporting of errors and exceptions. On this page, we get you up and running with Sentry's SDK, so that...
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