-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
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
google-gax is used by the @google-cloud libraries (eg https://github.com/googleapis/nodejs-compute/blob/main/package.json#L123).
google-gax seems to reference the library long (eg https://github.com/googleapis/gax-nodejs/blob/main/protos/operations.d.ts#L17), but that dependency is not in the package.json.
long changed to ESM in version 5, which causes our builds to currently fail with:
node_modules/google-gax/build/protos/operations.d.ts(17,23): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
It feels like google-gax (which isn't ESM) should pin long to 4.0.0 in order to ensure compatibility with non-esm apps, until google-gax itself switches to esm.
We've worked around this by:
"peerDependencies": {
"@google-cloud/compute": "3.1.2",
"long": "4.0.0"
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
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.