简体   繁体   English

Angular2 fire failed Namespace'firebase'没有导出成员'Promise'

[英]Angular2 fire fails Namespace 'firebase' has no exported member 'Promise'

I have installed angular2 fire 我安装了angular2 fire

 "angularfire2": "^5.0.0-rc.0",

Now in my app module(root module) 现在在我的app模块(根模块)

export const firebaseConfig = {
  apiKey: "mykey",
  authDomain: "....",
  databaseURL: "...",
  projectId: "...",
  storageBucket: "...",
  messagingSenderId: "..."
};

imports:[
    AngularFireModule.initializeApp(firebaseConfig), 
    AngularFireDatabaseModule
 ]

Now am geting an error 现在发现一个错误

 Class 'FirebaseApp' incorrectly implements interface 'App'.
  Property 'firestore' is missing in type 'FirebaseApp'.


node_modules/angularfire2/firebase.app.module.d.ts (12,28):
  Namespace 'firebase' has no exported member 'Promise'.

Where am i going wrong or what else do i need to add to have it work 我哪里出错了,或者我需要添加什么才能让它工作

firebase.Promise was removed in Firebase 4.5.0. firebase.Promise已在Firebase 4.5.0中删除。 "angularfire2": "^5.0.0-rc.2" accounts for this change. "angularfire2": "^5.0.0-rc.2"说明了这一变化。 This version should solve the issue you're having. 此版本应该可以解决您遇到的问题。

运行npm install anularfire2 --save命令它应该工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM