Auth is not a function when using compatibility in production build
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 2.2k
- 平均マージ
- 22時間 28分
- マージ済み PR(30日)
- 6
説明
### 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
コントリビューションガイド
調査の方向性
issue に記載されている production build を、main.ts:16 と angular-fire-compat-auth.js:59 での失敗から開始して再現します。development bundle と production bundle を比較し、compatibility auth API が存在しない理由を特定します。production build と development の両方で認証が正常に初期化されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, firebase, typescript
- 領域
- authentication, build-system, frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100