question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find name 'PhoneOrOauthTokenResponse', 'UserInternal'

See original GitHub issue

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 ** Screenshot 2022-05-07 at 4 03 25 PM

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:13
  • Comments:19

github_iconTop GitHub Comments

18reactions
rlacatuscommented, May 8, 2022

@PR4SAN Fixating Firebase to one version back fixed it for me. Maybe you need to clean your caches (e.g. node_modules)

How do I roll back my Firebase version if I used ng add @angular/fire ?

@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.

2reactions
JosaAyalacommented, May 8, 2022

This works for me!!!

@PR4SAN Fixating Firebase to one version back fixed it for me. Maybe you need to clean your caches (e.g. node_modules)

How do I roll back my Firebase version if I used ng add @angular/fire ?

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find name 'PhoneOrOauthTokenResponse' during ...
I had the same problem. This solution worked: npm install firebase@9.7.0 --save --save-exact. I got it from:.
Read more >
Angular-CLI Cannot find name 'ej' - Syncfusion
When I try to start my application it throws an error "Cannot find name 'ej'". How should I install typings for my Angular...
Read more >
UNPKG - @firebase/auth
552, MISSING_ANDROID_PACKAGE_NAME = "missing-android-pkg-name", ... 803, * UserInternal and AuthInternal reference each other, so both of them are included ...
Read more >
Fix the Cannot Find Name 'require' Error in TypeScript
To fix the “cannot find name 'require'” error in TypeScript, install the @types/node package into your project by running npm i -D @types/node...
Read more >
TypeScript error TS2304 cannot find name require - Edureka
The error that I'm getting is the "TS2304: Cannot find name 'require' " when I attempt to transpile a simple TypeScript Node.js page....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found