can't find compiler ngcc module after upgrading Angular and project

In your package.json file, change the @angular/cli version in devDependencies to:

"@angular/cli": "7.1.0"

There is a version mismatch between your project and the devDependency. You might have probably used npm audit fix --force or a similar auto update command, which might have updated the devDependencies in "package.json" file.

You can also use angular cli version 7.3.5 in devDependencies here. Just make sure that the development version and the version mentioned in devDependencies are compatible. Be aware that local anglular/cli version doesn't really matter here.

Update: After making the change, delete "package-lock.json" and delete the "node modules" folder. Run npm install to install the modules again.


I got same error and solved this by updating @angular/cli global. like:

npm uninstall -g @angular/cli
npm install -g @angular/cli

then tried creating new app and copied some dependencies from package.json file to current project because npm install doesn't install latest version of packages. then

npm install

this solved my problem but then I found this answer: update angular


All of that doesn't work for me, I was trying to upgrade from Angular 7 to Angular 8 and here is the working solution for me:

  1. npm outdated.
  2. npm update.
  3. npm install -g npm-check.
  4. npm-check -u --skip-unused.
  5. Upgrade all the outdated packages except the sass ones using npm-check.
  6. npm update.
  7. If you have ViewChild on your application, be sure to edit them to @ViewChild(<name>, {static: true}).