I had this error message when I updated then downgraded my angular webapp, the compiler option in tsconfig.json were changed and caused a similar error message. Specifically, these lines :
"compilerOptions": {
...
"target": "es2017",
"module": "es2020"
}