Skip to content

Getting build errors when running npm run compile on main #2439

@natilivni

Description

@natilivni

Hello, When I try to run npm run compile I get 7 compile errors. I have not made any changes to the code base and they are all in the jest and mocha @types dependencies.

Environment details

  • OS: macOS Sequoia 15.6.1
  • Node.js version: v18.16.1
  • npm version: 9.5.1
  • @google-cloud/firestore version: 7.11.6

Steps to reproduce

  1. clone main into a folder
  2. run npm install
  3. run npm run compile
  4. get the following results:
npm run compile

> @google-cloud/firestore@7.11.6 precompile
> gts clean

version: 18
Removing build ...

> @google-cloud/firestore@7.11.6 compile
> tsc -p .

../node_modules/@types/jest/index.d.ts:2:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'beforeEach' must be of type 'HookFunction', but here has type 'Lifecycle'.

2 declare var beforeEach: jest.Lifecycle;
              ~~~~~~~~~~

  node_modules/@types/mocha/index.d.ts:2642:13
    2642 declare var beforeEach: Mocha.HookFunction;
                     ~~~~~~~~~~
    'beforeEach' was also declared here.

../node_modules/@types/jest/index.d.ts:4:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'afterEach' must be of type 'HookFunction', but here has type 'Lifecycle'.

4 declare var afterEach: jest.Lifecycle;
              ~~~~~~~~~

  node_modules/@types/mocha/index.d.ts:2660:13
    2660 declare var afterEach: Mocha.HookFunction;
                     ~~~~~~~~~
    'afterEach' was also declared here.

../node_modules/@types/jest/index.d.ts:5:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'describe' must be of type 'SuiteFunction', but here has type 'Describe'.

5 declare var describe: jest.Describe;
              ~~~~~~~~

  node_modules/@types/mocha/index.d.ts:2676:13
    2676 declare var describe: Mocha.SuiteFunction;
                     ~~~~~~~~
    'describe' was also declared here.

../node_modules/@types/jest/index.d.ts:7:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'xdescribe' must be of type 'PendingSuiteFunction', but here has type 'Describe'.

7 declare var xdescribe: jest.Describe;
              ~~~~~~~~~

  node_modules/@types/mocha/index.d.ts:2697:13
    2697 declare var xdescribe: Mocha.PendingSuiteFunction;
                     ~~~~~~~~~
    'xdescribe' was also declared here.

../node_modules/@types/jest/index.d.ts:8:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'it' must be of type 'TestFunction', but here has type 'It'.

8 declare var it: jest.It;
              ~~

  node_modules/@types/mocha/index.d.ts:2711:13
    2711 declare var it: Mocha.TestFunction;
                     ~~
    'it' was also declared here.

../node_modules/@types/jest/index.d.ts:10:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'xit' must be of type 'PendingTestFunction', but here has type 'It'.

10 declare var xit: jest.It;
               ~~~

  node_modules/@types/mocha/index.d.ts:2732:13
    2732 declare var xit: Mocha.PendingTestFunction;
                     ~~~
    'xit' was also declared here.

../node_modules/@types/jest/index.d.ts:11:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'test' must be of type 'TestFunction', but here has type 'It'.

11 declare var test: jest.It;
               ~~~~

  node_modules/@types/mocha/index.d.ts:2725:13
    2725 declare var test: Mocha.TestFunction;
                     ~~~~
    'test' was also declared here.


Found 7 errors in the same file, starting at: ../node_modules/@types/jest/index.d.ts:2

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the googleapis/nodejs-firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions