Reputation: 5904
I get this error in my web application
ERROR in node_modules/zone.js/dist/zone.js.d.ts:600:21 - error TS2503: Cannot find namespace 'NodeJS'.
600 declare var global: NodeJS.Global;
As you can see here below i already added the types": ["node"]
property but it's still not working
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"types": ["node"],
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "es6",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
I don't really know how solve it. The applicationn starts the first time getting Cannot GET /
and then, after saving whatever file, it works but still with the NodeJS error. Thanks
Upvotes: 5
Views: 6562
Reputation: 961
While upgrade angular 8 to 13 i am facing same. Because zone.js not installed to my project. so install zone js the problem resolved.
npm i zone.js
Upvotes: 0
Reputation: 5904
For those who have this kind of problem i solved updating zone.js at version "zone.js": "^0.11.1"
Upvotes: 9