angularfire: Cannot find name 'PhoneOrOauthTokenResponse', 'UserInternal'
Version info
Angular: 13.2.0
Firebase:
AngularFire: 7.3.0
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
I followed the doc and initialized @angular/fire by ng add @angular/fire. and after that compiler is giving error.
Debug output
** Errors in the JavaScript console **
Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3137:22 - error TS2304: Cannot find name ‘PhoneOrOauthTokenResponse’.
3137 _tokenResponse?: PhoneOrOauthTokenResponse; ~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3429:11 - error TS2304: Cannot find name ‘UserInternal’.
3429 user: UserInternal; ~~~~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
✖ Failed to compile.
** Output from firebase.database().enableLogging(true);
**
** Screenshots **
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 12
- Comments: 19
Commits related to this issue
- Fix build fail https://github.com/angular/angularfire/issues/3217 — committed to pkges-com/eTodo by molaga 2 years ago
@robjvan - the issue is in the ‘firebase’ library, not ‘@angular/fire’ - I made the same mistake at first. Try:
npm install firebase@9.7.0 --save --save-exact
. That worked for me.This works for me!!!
I found something from dependency package in package.json
Test with 2 things is missing firebase package and use “firebase”: “~9.7.0” When I missing firebase package in package.json, nodejs will install package version 9.8.0 follow by picture
It has error with angular project
In case use package firebase with ~9.7.0 is pass with easy game
I think should check and fix dependency package in node_modules that use firebase 9.5.0-present (9.8.0) version has error with issue
Awesome - seems to be working here as well. Thank you so much!!