Closed arpit closed 4 years ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
@arpit Thanks for the report. You seem to be using two different versions of Firestore (one from node_modules/@google-cloud/firestore
and one from node_modules/firebase-admin/node_modules/@google-cloud/firestore
). As shown in your errors, this breaks the TypeScript compile.
We haven't yet updated Firebase Admin to include Firestore 3.0. If you want to avoid this problem, you can install Firebase Admin from this branch:
"dependencies": {
"firebase-admin": "git+https://github.com/firebase/firebase-admin-node.git#firestore-30"
}
@schmidt-sebastian We are currently using firebase-admin 8.10.0 and facing this issue. Does it mean firestore 3.0 is not yet into the admin module?
Firebase Admin Node depends on 3.x Firestore: https://github.com/firebase/firebase-admin-node/blob/master/package.json#L64
So any reason why its still showing the confict?
I have seen cases like this before when two version of Firestore were included via NPM's dependency resolution. This doesn't necessarily have to be related to Firebase Admin.
Ok, Here is our scenario. We installed both firebase-admin as well as @google-cloud/firestore in our project. The reason why we had @google-cloud/firestore is
What we have observed is nested node-modules folder with in the node-modules/firebase-admin has @google-cloud/firestore types too leading to the issue. We see it a general use case too as its quite common to use @google-cloud/firestore package.
This issue didn't happen earlier but only on upgrading to latest firebase-admin.
To solve it temporarily, we just deleted the types file listed in firebase-admin to avoid the conflicting error. But we see it would be great if there is a right solution.
You should be able to use @google-cloud/firestore
and firebase-admin
together if they point to the same version. NPM will not duplicate the package if the version can be shared.
Seeing this same error now too.
Currently have the following packages:
"firebase-admin": "^8.12.1",
"@google-cloud/firestore": "^3.8.0",
Adding skipLibCheck
in tsconfig to true allows me to continue, but ideally we don't want to do that.
@asithade thank you for the workaround.
I'm facing the same issue with
"@google-cloud/pubsub": "^2.14.0",
"firebase-admin": "^9.9.0",
Is there any fix / workaround except skipLibCheck
?
3.0.0 was only released yesterday, so not unexpected but still