firebase-functions-rate-limiter icon indicating copy to clipboard operation
firebase-functions-rate-limiter copied to clipboard

Definitions conflict

Open gantonioid opened this issue 3 years ago • 2 comments

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

  1. 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"
  1. npm run build

Environment

Expected Behavior

A successful build

Screenshots

image image

Additional context

gantonioid avatar Oct 17 '22 18:10 gantonioid

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

bennypowers avatar Oct 20 '22 09:10 bennypowers

My PR must fix it: https://github.com/Jblew/firebase-functions-rate-limiter/pull/43

But the maintainer has not answered yet =(

omgovich avatar Jan 25 '23 09:01 omgovich