Angular ng serve produces Error: NGCC failed
In my particular case the @angular-devkit/build-angular was updated to "^0.1002.0" in my package.json after running the npm audit fix. (This version seems to belong to angular 10, instead of the local projects' angular version (v9.1.3))
After reverting this change, everything started working again :
"@angular-devkit/build-angular": "~0.901.12"
Just had the same Issue.
Fixed it by adding following to the tsconfig.app.json:
"angularCompilerOptions": {
"enableIvy": false
},
Hope this helps
I had the error:
Unknown arguments: use-program-dependencies, useProgramDependencies
An unhandled exception occurred: NGCC failed.
See "C:\...\angular-errors.log" for further details.
I just updated angular cli, material and core, and other modules needed to my project, then updated npm and typescript package, and that's all.
ng update @angular/cli @angular/core
npm update @angular/material @angular/cdk
npm install -g typescript@latest