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

Missing exports in v18? #3538

Closed
petrot opened this issue May 24, 2024 · 2 comments
Closed

Missing exports in v18? #3538

petrot opened this issue May 24, 2024 · 2 comments

Comments

@petrot
Copy link

petrot commented May 24, 2024

Version info

Angular:
18.0.1
Firebase:
10.12.1
AngularFire:
18.0.0
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Ionic 8.2.0

How to reproduce these conditions

I have the following initialization in my main.ts:

[...]
provideAuth(() => {
      if (Capacitor.isNativePlatform()) {
        return initializeAuth(getApp(), {
          persistence: indexedDBLocalPersistence,
        });
      } else {
        return getAuth();
      }
    }),

It worked before updating to v18 with the following imports:

import {
  indexedDBLocalPersistence,
  getAuth,
  initializeAuth,
  provideAuth,
} from '@angular/fire/auth';

In v18 I have to import the indexedDBLocalPersistence from firebase/auth.

import { indexedDBLocalPersistence } from '@firebase/auth';

Is it normal??

Debug output

** Errors in the JavaScript console **

SyntaxError: The requested module '/@fs/Users/tomi/Dev/tamaspetro/rofi-cap/.angular/cache/18.0.1/vite/deps/@angular_fire_auth.js?v=aa35568b' does not provide an export named 'indexedDBLocalPersistence' 

Expected behavior

Allow import from @angular/fire/auth (??)

Actual behavior

Have to import from @firebase/auth

@jnizet
Copy link

jnizet commented May 24, 2024

Have you tried version 18.0.1, because a similar issue was fixed: #3536.

@petrot
Copy link
Author

petrot commented May 26, 2024

@jnizet thanks, the problem has been solved with 18.0.1!

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

3 participants