Reputation: 109
I am getting the below error while deploying firebase cloud functions. This is happening after upgrading firebase-tool and npm to the latest versions.
node_modules/geofirestore/dist/GeoFirestoreTypes.ts:3:10 - error TS2614:
Module
'"**/flutter/project123/functions/node_modules/geofirestore/node_modules/firebase"' has no exported member 'firestore'.
Did you mean to use 'import firestore from
"**/flutter/project123/functions/node_modules/geofirestore/node_modules/firebase"' instead?
3 import { firestore as webfirestore } from 'firebase/app';
Package.json
{
"name": "functions",
"scripts": {
"lint": "tslint --project tsconfig.json",
"build": "tsc",
"serve": "npm run build && firebase emulators:start --only functions",
"shell": "npm run build && firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "12"
},
"main": "lib/index.js",
"dependencies": {
"@google-cloud/firestore": "^3.7.3",
"firebase": "^7.13.2",
"firebase-admin": "^9.11.1",
"firebase-functions": "^3.15.4",
"firebase-tools": "^9.3.0",
"geofirestore": "^3.4.1"
},
"devDependencies": {
"firebase-functions-test": "^0.1.6",
"tslint": "^5.12.0",
"typescript": "^3.2.2"
},
"private": true
}
Upvotes: 0
Views: 101
Reputation: 76817
The imports for geofirestore
should generically look alike this (much has changed with v8):
import firebase from 'firebase/app';
import 'firebase/firestore';
import * as geofirestore from 'geofirestore';
This import only works with v7 (and should be substituted with the above):
import * as firebase from "firebase/app";
Upvotes: 1