Angular 5 + Firebase: Namespace 'firebase.auth' has no exported member 'IdTokenResult'

gerard talla picture gerard talla · Jun 5, 2018 · Viewed 9.9k times · Source

I am currently work on web project using Angular 5 and I want to integrate the Firebase Cloud Messaging to send notification on app, bt I faced to a lot of problems that I tried to fix them. Right now there two errors that I'm not able to fix concerning: Namespace 'firebase.auth' and functions

The errors look like:

ERROR in node_modules/angularfire2/auth/auth.d.ts(12,45): error TS2694: Namespace 'firebase.auth' has no exported member 'IdTokenResult'.
node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"/Users/gerardtalla/dev/workspaces/ws-parcaune/pms/pms-frontend-2018/node_modules/firebase/app/index"' has no exported member 'functions'.

How can I fix that? I'm using

Angular 5

"firebase": "4.8.0"

"angularfire2": "^5.0.0-rc.5"

"@angular/cli": "~1.7.3"

if someone has an idea do not hesitate please share with me. Thank a lot in advance.

Answer

Marouan picture Marouan · Jun 7, 2018

just use "angularfire2": "5.0.0-rc.5" instead of "angularfire2": "^5.0.0-rc.5"