After upgrading from Angular 9.17 to 9.19, my ng build process started failing with an error related to 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.
The build was working fine before the upgrade, and this specific change has caused the issue.
I would appreciate any assistance or advice on resolving this problem.
This is a snippet of my package.json for reference:
{
"name": "myapp",
"private": true,
(rest of the package.json content as per the original text)
}