Closed ytetsuro closed 2 years ago
Unable to add the GeoPoint class of the SDK for the browser to firestore.
$ npm i firebase $ npm i -D @firebase/rules-unit-testing $ node ./path/to/relevantCode.js
const {firestore} = require('firebase'); const firebase = require('@firebase/rules-unit-testing'); const connection = firebase.initializeTestApp({projectId: 'dummy'}); const db = connection.firestore(); const batch = db.batch(); batch.set(db.doc('foo/bar'), {geo: new firestore.GeoPoint(36.2, 41.2)}); batch.commit();
I changed the firebase version to Series 8 and it worked correctly.
$ npm i firebase@^8
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Unable to add the GeoPoint class of the SDK for the browser to firestore.
Steps to reproduce:
Relevant Code: