升级angular应用程序以使用@ angular / fire 5.1.0

时间:2018-11-07 16:50:34

标签: angular firebase angularfire5

我正尝试升级我的应用程序以使用@ angular / fire而不是angularFire2,因为它已弃用。升级evrything的那一刻,我收到以下错误消息:

wait(3)

因此,我开始在网上搜索解决方案。最终我找到了答案here

它表示我需要将Firebase降级到版本“ 4.8.0”。当我这样做时,错误消失了,但是我收到了这个新错误:

ERROR in node_modules/@angular/fire/auth/auth.d.ts(4,28): error TS2307: Cannot find module 'firebase/app'.
node_modules/@angular/fire/database/interfaces.d.ts(2,26): error TS2307: Cannot find module 'firebase/app'.
node_modules/@angular/fire/firebase.app.module.d.ts(2,79): error TS2307: Cannot find module 'firebase/app'.

版本:

  • “ @ angular / fire”:“ ^ 5.1.0”,
  • “ firebase”:“ ^ 4.12.1”(我从4.8.0尝试到5.5.7),
  • “ @ angular / core”:“ ^ 5.2.0”,

如果您需要更多信息,请随时询问

1 个答案:

答案 0 :(得分:0)

我使用以下配置摆脱了该错误

  

“ @ angular / fire”:“ ^ 5.1.0”,
  “ firebase”:“ ^ 5.5.9”,
  “ @ angular / core”:“ 5.2.11”,
  “ rxjs”:“ ^ 6.3.3”,
  “ rxjs-compat”:“ ^ 6.3.3”,

希望有帮助