Vue、Nuxtを使用して、Firestoreへの接続を試みているのですが、以下の設定を行いましたが、エラーとなります。
解消方法について教えていただけないでしょうか。
plugins/firebase.js
import firebase from 'firebase' if (!firebase.apps.length) { firebase.initializeApp({ apiKey: "xxxxx", authDomain: "xxxxx", databaseURL: "xxxxx", projectId: "xxxxx", torageBucket: "xxxxx", messagingSenderId: "xxxxx" }) } // DB設定 const firestore = firebase.firestore() const settings = { timestampsInSnapshots: true } firestore.settings(settings) export default firebase
エラー内容
FirebaseError
Function Firestore.settings() requires its first argument to be of type object, but it was: a custom Object object
node_modules/@firebase/firestore/dist/index.node.cjs.js
* and compatible `code` and `message` fields.) */ var FirestoreError = /** @class */ (function (_super) { tslib_1.__extends(FirestoreError, _super); function FirestoreError(code, message) { var _this = _super.call(this, message) || this; ←ここがハイライトされている _this.code = code; _this.message = message; _this.name = 'FirebaseError'; // HACK: We write a toString property directly because Error is not a real // class and so inheritance does not work correctly. We could alternatively
バージョン
"firebase": "^6.0.4"
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/02 13:57