/angularfire2/index has no exported member 'AngularFire'

后端 未结 3 730
悲&欢浪女
悲&欢浪女 2020-12-09 18:08

Can\'t fix this problem:

app.component.ts

import { AngularFire, AuthProviders, AuthMethods } from \'angularfire2\';

/angularfire2/index has no expor         


        
相关标签:
3条回答
  • 2020-12-09 18:26

    Upgrading to AngularFire2 4.0 solve my issue

    Migration Guide: https://github.com/angular/angularfire2/blob/master/docs/version-4-upgrade.md

    0 讨论(0)
  • 2020-12-09 18:35

    Since you are using angularfire2@4.0.0+, there is no AngularFire exported any more. Instead, you shall use it as below:

    // import AngularFireAuthModule at NgModule
    import { AngularFireAuthModule } from 'angularfire2/auth';
    
    
    import { AngularFireAuth } from 'angularfire2/auth';
    // inject 
    construstor(afa: AngularFireAuth) {
      afa.auth.signInWithPopup()
    }
    
    0 讨论(0)
  • 2020-12-09 18:51

    The solution is :

    With the "angularfire2": "^5.1.1",

    you need this libraries too:

    "rxfire": "^3.3.5",
    "rxjs": "6.3.3",
    "rxjs-compat": "6.3.3",
    
    0 讨论(0)
提交回复
热议问题