It takes me a lot of time to fix it. Thanks to https://fireflysemantics.medium.com/adding-types-node-to-angular-84a629976c86 for the solution below:
Approach
npm i -S @types/node
Then in tsconfig.json
"angularCompilerOptions": {
"types" : ["node"]
....
}