Auth is not a function when using compatibility in production build
- Lingua principale
- TypeScript
- Stelle
- 7.8k
- Fork
- 2.2k
- Merge medio
- 22h 28m
- PR unite (30g)
- 6
Descrizione
### Version info
**Angular:** 13.3.0
**Firebase:** ^9.8.1
**AngularFire:** 7.3.0
**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
### How to reproduce these conditions
**Steps to set up and reproduce**
When a production build is served, we have an error with Firebase app.auth() is not found. This does not happen with a development build.
We are using the compatibility version of Angular Fire.
### Debug output
** Errors in the JavaScript console **
> main.ts:16 TypeError: Bt.auth is not a function
> at angular-fire-compat-auth.js:59:51
> at rr.invoke (zone.js:409:30)
> at rr.run (zone.js:169:47)
> at value (core.mjs:25486:28)
> at angular-fire-compat-auth.js:59:23
> at tn (angular-fire-compat.js:147:29)
> at we (angular-fire-compat-auth.js:58:116)
> at new Ue (angular-fire-compat-firestore.js:513:13)
> at Object.$e.ɵfac [as factory] (angular-fire-compat-firestore.js:584:1)
> at value (core.mjs:11477:35)
### Expected behavior
Build runs on both development and production
### Actual behavior
Build runs only in development
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci la build di produzione descritta nell’issue, partendo da main.ts:16 e dal fallimento in angular-fire-compat-auth.js:59. Confronta i bundle di sviluppo e di produzione per identificare il motivo per cui manca l’API di autenticazione di compatibilità. Il lavoro è completato quando l’autenticazione viene inizializzata correttamente sia in una build di produzione sia in sviluppo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, firebase, typescript
- Ambito
- authentication, build-system, frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100