Typescript Error: Argument of type 'Firestore' is not assignable to parameter of type 'firebase.firestore.Firestore | FirebaseFirestore.Firestore'.
lsps9150414 opened this issue · comments
[REQUIRED] Describe your environment
- "geofirestore": "^4.2.1",
- "firebase": "7.9.0",
[REQUIRED] Describe the problem
Describe the bug
Getting
Argument of type 'Firestore' is not assignable to parameter of type 'firebase.firestore.Firestore | FirebaseFirestore.Firestore'.
when
const geoFirestore = geofirestore.initializeApp(firebase.firestore());
Steps to Reproduce
- Go to '...'
- Click on '....'
- Scroll to '....'
- See error
Relevant Code
Reproduce the issue on StackBlitz and provide your forked URL or provide sample code below
https://stackblitz.com/fork/geofirestore-issue-sandbox
// TODO(you): code here to reproduce the problem
Can you please provide an example repo or stackblitz where this can be observed?
@lsps9150414 I just wanted to see if there was anything more you could share to help me identify and help solve your problem.
@lsps9150414 I had the same problem and after updating firebase it went away I am now on
"firebase": "^7.21.0",
"geofirestore": "^4.3.0"
@moulie415 can you provide a repo where this issue is reproducable?
@MichaelSolati I also having this issue, problem is that I'm having different firebase version (8.2.3) in my project, and the geofirestore-core compare it with different version of firestore (8.4.1?), I have to use // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore
to avoid this
@Tj3n can you provide a repo where this issue is reproduceable?
@MichaelSolati I am faced with this issue after updating @angular/fire to v7.1.1 , firebase to v9 and with current version of geofirestore.
Unfortunately I cannot provide you with the repo since it is private.
Please resolve this issue since most of the us would be migrating to @angular/fire v7 and firebase v9
Hi, I'm getting the same error after upgrading @angular/fire from v6.1.4 to 7.2.0 and firebase from v8.6.2 to v9.6.4
There is a breaking change in AngularFire v7 and to maintain compatibility, you have to change firebase import to:
import firebase from 'firebase/compat/app';
And I suppose that there is the root of the conflict
In my case, I solved simply ignoring the error with
// @ts-ignore
At runtime it is working well