I was getting this error with Angular 14 on node v18.17.1. I added this to my package.json and it solved the issue "@types/node": "^16.18.50"
"@types/node": "^16.18.50"