angular / angular/angularfire

Auth is not a function when using compatibility in production build

Ouverte
#3,221 20 commentaires 14 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
7.8k
Forks
2.2k
Merge moyen
22 h 28 min
PR mergées (30 j)
6

Description

### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduisez le build de production décrit dans l’issue, en partant de main.ts:16 et de l’échec dans angular-fire-compat-auth.js:59. Comparez les bundles de développement et de production afin d’identifier pourquoi l’API d’authentification de compatibilité est absente. Le travail est terminé lorsque l’authentification s’initialise correctement dans un build de production comme en développement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, firebase, typescript
Domaine
authentication, build-system, frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.