Skip to content

@types/node": "14.0.5" - Variable 'global' must be of type 'Global', but here has type 'Global & typeof globalThis'. #45116

@molyviatis

Description

@molyviatis

I upgraded from Angular 9.17 to 9.19 and now ng build fails with the following error complaining about a variable declaration in both @types/node and zone.js:

ERROR in node_modules/@types/node/ts3.5/globals.global.d.ts:1:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'global' must be of type 'Global', but here has type 'Global & typeof globalThis'.

1 declare var global: NodeJS.Global & typeof globalThis; ~~~~~~

node_modules/zone.js/dist/zone.js.d.ts:600:13 600 declare var global: NodeJS.Global; ~~~~~~ 'global' was also declared here.

When I downgrade @types/node to 14.0.4, everything works. I am using version 0.10.3 of zone.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions