Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3225:23 - error TS2304: Cannot find name 'FactorId_2'. #7174

Closed
jnizet opened this issue Mar 30, 2023 · 20 comments · Fixed by #7179

Comments

@jnizet
Copy link

jnizet commented Mar 30, 2023

[REQUIRED] Describe your environment

  • Operating System version: macOS 13.1
  • Browser version: NA
  • Firebase SDK version: 9.19.0
  • Firebase Product: auth

[REQUIRED] Describe the problem

Steps to reproduce:

  • Try to compile an Angular project using Firebase 9.19.0
  • The compilation fails with the error
Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3225:23 - error TS2304: Cannot find name 'FactorId_2'.

The auth-public.d.ts file does indeed seem to reference a FactorId_2 symbol that doesn't exist.

It's documented as excluded at line 1160 of the file:

/* Excluded from this release type: FactorId_2 */
@eun-choi
Copy link

eun-choi commented Mar 31, 2023

+1

[ng] Build at: 2023-03-31T00:13:15.682Z - Hash: cd01b281d54b92c9 - Time: 107314ms [ng] [ng] Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3225:23 - error TS2304: Cannot find name 'FactorId_2'. [ng] [ng] 3225 static FACTOR_ID: FactorId_2; [ng] ~~~~~~~~~~ [ng] [ng] [ng] [ng] ✖ Failed to compile.

@dwyfrequency
Copy link
Contributor

dwyfrequency commented Mar 31, 2023

@jnizet or @eun-choi, can you provide a minimal reproducible repo?

@duncanchiu409
Copy link

I am using firebase version: ^9.6.7 . Had the same issue

@duncanchiu409
Copy link

This is my reproduced error repo. Hope helps. Pretty simple to reproduce the problem.
https://github.com/duncanchiu409/firebase-issue7174

@jnizet
Copy link
Author

jnizet commented Mar 31, 2023

Here's mine (this PR specifically, which upgrades to the latest version: jnizet/maison-solidaire#147).

Steps to reproduce:

  • clone the repo and checkout that branch
  • yarn
  • yarn build

@PrajinThunoli
Copy link

Same for me too
node_modules/@firebase/auth/dist/auth-public.d.ts:3225:23 - error TS2304: Cannot find name 'FactorId_2'.

3225 static FACTOR_ID: FactorId_2;

Did a npm update and build this issue came up

@jbalidiong jbalidiong added the v9 label Mar 31, 2023
@hassan-badat
Copy link

A temporary work around is to add the value:

"skipLibCheck": true

to your tsconfig.json

@jbalidiong
Copy link
Contributor

Thanks for sharing the minimal repro @jnizet and @eun-choi. I was able to replicate the error with the latest version of our SDK. Let me check what we can do for this issue or bring someone from the Auth team that can provide more context about it. I’ll update this thread if I have any information to share.

@malik-devops
Copy link

i can't build my docker image because i have the same error:

Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3225:23 - error TS2304: Cannot find name 'FactorId_2'.

how can i solve this problem ?

@Monuk0
Copy link

Monuk0 commented Mar 31, 2023

@dwyfrequency I am facing similar issue in my project can you please explain me what exactly is minimal minimal reproducible repo, my project in angular 13 could you please help me. to solve this issue. I really great thx. full to you.

@jeremyandes
Copy link

jeremyandes commented Mar 31, 2023

For now to compile (I don't know if this would work for everyone and if this is the solution), you can change the FACTOR_ID type to string in this class (file node_modules/@firebase/auth/dist/auth-public.d.ts):
image

As far as I know, this type can be implemented as the PhoneMultiFactorGenerator class:
image

@DwieDima
Copy link

same here.
For now i'm downgrading to "firebase": "9.9.1" until issue is resolved

@JakobMadsen717
Copy link

I think downgrading to [email protected] would work fine

@DimaIgorevich
Copy link

DimaIgorevich commented Mar 31, 2023

But this issue also repro on @angular/fire lib because has dependency inside to firebase.

@pietroow
Copy link

A temporary work around is to add the value:

"skipLibCheck": true

to your tsconfig.json

Doing that does not avoid the error.
You still have the issue at runtime

I think downgrading to [email protected] would work fine

Not working, this version still having the same implementation.
static FACTOR_ID: FactorId_2;

@henriquesschmitt
Copy link

Same error here, using "firebase": "^9.19.0"

@dpsifr
Copy link

dpsifr commented Mar 31, 2023

Seeing the same problem and it has left me dead in the water and not able to even start or build our project.

@hsubox76
Copy link
Contributor

We'll try to get a fix out today but you can just roll back to the previous version of Firebase (9.18.0) in the meantime.

@hsubox76
Copy link
Contributor

Published 9.19.1, which should have the fix.

For future users who come by this issue: Do not use 9.19.0, use 9.19.1 or higher.

@RichardGuesso
Copy link

@hsubox76 its work!!!

@firebase firebase locked and limited conversation to collaborators May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.