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

GoogleAuthProvider not exported anymore in v18 #3536

Closed
jnizet opened this issue May 23, 2024 · 10 comments
Closed

GoogleAuthProvider not exported anymore in v18 #3536

jnizet opened this issue May 23, 2024 · 10 comments

Comments

@jnizet
Copy link

jnizet commented May 23, 2024

Version info

Angular:

18.0.0

Firebase:

10.12.0

AngularFire:

18.0.0

Other (e.g. Ionic/Cordova, Node, browser, operating system):

Node v20.12.2
macOS

How to reproduce these conditions

?

Failing test unit, Stackblitz demonstrating the problem

Steps to set up and reproduce

Have an

import { GoogleAuthProvider } from '@angular/fire/auth';

in a source file, and run ng build.

The build fails with

✘ [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-auth.mjs" for import "GoogleAuthProvider"

    src/app/main/authentication.service.ts:4:9:
      4 │ import { GoogleAuthProvider, signInWithEmailAndPassword, signInWith...
        ╵          ~~~~~~~~~~~~~~~~~~

ng serve works fine. And the import was fine with angularFire 17.x.

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@anisabboud
Copy link

anisabboud commented May 23, 2024

Same issue with Timestamp, ReCaptchaV3Provider, and Email/Facebook/Google/Phone AuthProviders.
Works with AngularFire 17.1.0, but not with 18.0.0.

$ ng serve
Application bundle generation failed.


✘ [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-firestore.mjs" for import "Timestamp"

        │ import { Timestamp } from '@angular/fire/firestore';


✘ [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-app-check.mjs" for import "ReCaptchaV3Provider"

        │ import { ReCaptchaV3Provider, initializeAppCheck, provideAppCheck } from '@angular/fire/app-check';


✘ [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-auth.mjs" for import "EmailAuthProvider"
✘ [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-auth.mjs" for import "FacebookAuthProvider"
✘ [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-auth.mjs" for import "GoogleAuthProvider"
✘ [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-auth.mjs" for import "PhoneAuthProvider"

        │ import { EmailAuthProvider, FacebookAuthProvider, GoogleAuthProvider, PhoneAuthProvider } from '@angular/fire/auth';

@SebApptien
Copy link

Same for Geopoint :

X [ERROR] No matching export in "node_modules/@angular/fire/fesm2022/angular-fire-firestore.mjs" for import "GeoPoint"

@docaohuynh
Copy link

docaohuynh commented May 23, 2024

I have got same error when upgrade to angular 18, AngularFire 18.0.0
Error: export 'GoogleAuthProvider' (imported as 'GoogleAuthProvider') was not found in '@angular/fire/auth' (possible exports: Auth, AuthInstances, AuthModule, applyActionCode, authInstance$, authState, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, getRedirectResult, idToken, initializeAuth, initializeRecaptchaConfig, isSignInWithEmailLink, linkWithCredential, linkWithPhoneNumber, linkWithPopup, linkWithRedirect, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, provideAuth, reauthenticateWithCredential, reauthenticateWithPhoneNumber, reauthenticateWithPopup, reauthenticateWithRedirect, reload, revokeAccessToken, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updatePhoneNumber, updateProfile, useDeviceLanguage, user, validatePassword, verifyBeforeUpdateEmail, verifyPasswordResetCode)

@jamesdaniels
Copy link
Member

Hmmm that odd, I'll explore what might have happened with these exports. Presumably Typescript 5.4 is fighting our build pipeline

@jamesdaniels
Copy link
Member

It appears to be a bug with the RC version of ng-packagr mangling fesm2022 so export * was not workign correctly, which I embarrassedly cut final against. This appears to be resolved in the final release, pushed a commit to main branch now which I was testing against, hopefully the canary will prove the fix and I can cut 18.0.1

@jamesdaniels
Copy link
Member

@angular/fire@18.0.0-canary.cd18129 has the fix, cutting 18.0.1 now

@jnizet
Copy link
Author

jnizet commented May 23, 2024

Thank you so much for the quick fix and the quick release.

@jamesdaniels
Copy link
Member

@jnizet NP, thank you for reporting!

We'll get our current test suite gap closed, so we're actually using the canary bundle in an integration test with a sample app, so we can catch build problems like this before they hit prod.

@jonathansigg
Copy link

I have still a problem with appcheck on web

provideAppCheck(() => {
    const provider = new ReCaptchaV3Provider(recaptcha3SiteKey);
    return initializeAppCheck(undefined, { provider, isTokenAutoRefreshEnabled: true });
  }),

This gets me everytime the "document is not defined error", and i can't find any fix, that is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants