I might be replying late on this. But removing this can be helpful for some people who are still looking for solutions to this problem and has this in their code. We had below entry since long in our tsconfig.json file:
"angularCompilerOptions": {
"enableIvy": false
}
We also face same problem. After lot of experiments, we removed this block from tsconfig.json. Now our code is not complaining this problem anymore.