This repository was archived by the owner on Mar 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 163
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
Undecalred dependency to "long" in types #2322
Copy link
Copy link
Closed
Labels
api: firestoreIssues related to the googleapis/nodejs-firestore API.Issues related to the googleapis/nodejs-firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS: Linux
- Node.js version: v20
- npm version: pnpm 9
@google-cloud/firestoreversion: 7.11- typescript
Steps to reproduce
The issue is purely a TS type issue. Since I did not find a existing repport on this, I assume that it's something exotic with my config, possibly using pnpm which isolate modules with their declared dependencies.
The issue is those usage of the long library in types https://github.com/googleapis/nodejs-firestore/blob/main/types/protos/firestore_admin_v1_proto_api.d.ts#L18 (same in the other proto types). Since the dependency is not declared in the package.json, our build fails.
│ > NODE_OPTIONS='--max_old_space_size=6144' tsc -b
│ node_modules/.pnpm/@google-cloud+firestore@7.11.0_encoding@0.1.13/node_modules/@google-cloud/firestore/types/protos/firestore_admin_v1_proto_api.d.ts(18,23): error TS2307: Cannot find module 'long' or its c…
│ node_modules/.pnpm/@google-cloud+firestore@7.11.0_encoding@0.1.13/node_modules/@google-cloud/firestore/types/protos/firestore_v1_proto_api.d.ts(18,23): error TS2307: Cannot find module 'long' or its corresp… │ node_modules/.pnpm/@google-cloud+firestore@7.11.0_encoding@0.1.13/node_modules/@google-cloud/firestore/types/protos/firestore_v1beta1_proto_api.d.ts(18,23): error TS2307: Cannot find module 'long' or its co…
│ ELIFECYCLE Command failed with exit code 1.
Something I noticed is that this import is not even used, maybe it could be removed and that would fix the issue? (I'm happy to do the MR if that's okay)
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: firestoreIssues related to the googleapis/nodejs-firestore API.Issues related to the googleapis/nodejs-firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.