firebase-functions-rate-limiter
firebase-functions-rate-limiter copied to clipboard
Definitions conflict
Description
Trying to add the package in my project, I'm getting build errors
node_modules/@google-cloud/firestore/types/firestore.d.ts:23:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: DocumentData, UpdateData, Firestore, GeoPoint,
Transaction, BulkWriter, BulkWriterError, WriteBatch, SetOptions, WriteResult, DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, OrderByDirection, WhereFilterOp, Query, QuerySnapshot, DocumentChangeType, CollectionReference, CollectionGroup, QueryPartition, FieldValue, FieldPath, Timestamp, BundleBuilder, v1beta1, v1, OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, DATA_LOSS, UNAUTHENTICATED, FirebaseFirestore
node_modules/firebase-functions-rate-limiter/node_modules/@google-cloud/firestore/types/firestore.d.ts:23:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: DocumentData, UpdateData, Firestore, GeoPoint, Transaction, BulkWriter, BulkWriterError, WriteBatch, SetOptions, WriteResult, DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, OrderByDirection, WhereFilterOp, Query, QuerySnapshot, DocumentChangeType, CollectionReference, CollectionGroup, QueryPartition, FieldValue, FieldPath, Timestamp, BundleBuilder, v1beta1, v1, OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, DATA_LOSS, UNAUTHENTICATED,
FirebaseFirestore
To Reproduce
- Firebase functions project, node 16
"firebase-admin": "^11.1.0",
"firebase-functions": "^4.0.0",
"firebase-functions-rate-limiter": "^3.9.1",
"typescript": "^4.8.4"
npm run build
Environment
Expected Behavior
A successful build
Screenshots

Additional context
I'm working around this by removing the link to @google-cloud (npm v8):
# predeploy.sh
if [ -z "$CI_ENVIRONMENT_NAME" ]; then
# WORKAROUND for https://github.com/Jblew/firebase-functions-rate-limiter/issues/42
rm -rf functions/node_modules/firebase-functions-rate-limiter/node_modules/@google-cloud/
npm run build --prefix functions;
fi
My PR must fix it: https://github.com/Jblew/firebase-functions-rate-limiter/pull/43
But the maintainer has not answered yet =(