NativeScript / NativeScript/firebase
[@nativescript/firebase-firestore] ERROR collectionWithPath #bug
オープン
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 62
- フォーク
- 53
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 2
説明
Bug Report: Cannot read properties of undefined (reading 'collectionWithPath') in Firebase Firestore
Description
When trying to fetch data from Firestore using firebase().firestore().collection("users"), the following error occurs:
However, initializing Firebase in App.vue instead of app.js resolves the issue.
Environment
- NativeScript-Vue:
3.0.0-rc.2 - @nativescript/firebase-firestore:
3.4.0-alpha.1 - Platform: (e.g., Android, iOS)
Steps to Reproduce
- Initialize Firebase in
app.jslike this:import { firebase } from "@nativescript/firebase-core"; import "@nativescript/firebase-firestore"; firebase().initializeApp({ showNotifications: true, showNotificationsWhenInForeground: true, }); - Fetch Firestore data in Users.vue
firebase()
.firestore()
.collection("users")
.orderBy("points", "desc")
.where("points", ">", 0)
.get()
.then((querySnapshot) => {
querySnapshot.forEach((documentSnapshot) => {
users.push({
...documentSnapshot.data(),
id: documentSnapshot.id,
});
});
});
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
app.js での初期化と Users.vue での Firestore 呼び出しから始め、報告されている NativeScript-Vue および @nativescript/firebase パッケージを再現コンテキストとして使用します。初期化を App.vue に配置した場合の動作を比較し、その後、初期化を app.js に保持したまま Users.vue から users コレクションを取得できることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- firebase, typescript
- 領域
- database, mobile-dev
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100