Skip to content

google-gax Cannot find name 'Long' #376

@Bastianowicz

Description

@Bastianowicz
  • OS: ubuntu-20.04 Version: 20210302.0
  • Node.js version: 14
  • npm version: 7.6.0
  • google-gax version: google-gax@2.10.3

Steps to reproduce

  1. create a new bare project
  2. npm i firebase-admin@9.5.0 (which is latest at the moment
  3. create a typescript file and import firebase-admin import admin from "firebase-admin";
  4. build the typescript project

Expected

Builds like a charm

Experienced

node_modules/google-gax/build/protos/iam_service.d.ts:4283:40 - error TS2304: Cannot find name 'Long'.

4283             positiveIntValue?: (number|Long|null);
                                            ~~~~

node_modules/google-gax/build/protos/iam_service.d.ts:4286:40 - error TS2304: Cannot find name 'Long'.

4286             negativeIntValue?: (number|Long|null);
                                            ~~~~

node_modules/google-gax/build/protos/iam_service.d.ts:4314:46 - error TS2304: Cannot find name 'Long'.

4314             public positiveIntValue: (number|Long);
                                                  ~~~~

node_modules/google-gax/build/protos/iam_service.d.ts:4317:46 - error TS2304: Cannot find name 'Long'.

4317             public negativeIntValue: (number|Long);
                                                  ~~~~

node_modules/google-gax/build/protos/operations.d.ts:3761:40 - error TS2304: Cannot find name 'Long'.

3761             positiveIntValue?: (number|Long|null);
                                            ~~~~

node_modules/google-gax/build/protos/operations.d.ts:3764:40 - error TS2304: Cannot find name 'Long'.

3764             negativeIntValue?: (number|Long|null);
                                            ~~~~

node_modules/google-gax/build/protos/operations.d.ts:3792:46 - error TS2304: Cannot find name 'Long'.

3792             public positiveIntValue: (number|Long);
                                                  ~~~~

node_modules/google-gax/build/protos/operations.d.ts:3795:46 - error TS2304: Cannot find name 'Long'.

3795             public negativeIntValue: (number|Long);
                                                  ~~~~

node_modules/google-gax/build/protos/operations.d.ts:4484:31 - error TS2304: Cannot find name 'Long'.

4484             seconds?: (number|Long|null);
                                   ~~~~

node_modules/google-gax/build/protos/operations.d.ts:4500:37 - error TS2304: Cannot find name 'Long'.

4500             public seconds: (number|Long);
                                         ~~~~


Found 10 errors.

Unfortunately i could not see any changes in the operations.d.ts but i could easily resolve the issue locally by importing the missing type within the file in the node_modules dir.
If adding the import is the resolution to this error I am happy to create a PR with the imports in operations.d.ts and iam_service.d.ts.

I attach the failing project.
repo.zip

Metadata

Metadata

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions