title: getting error Cannot find module '@angular/compiler-cli/ngcc' in angular 8
body: <p>I am getting this error when I trying to run ng serve from my terminal window. </p>
  
  <pre><code>An unhandled exception occurred: Cannot find module '@angular/compiler-cli/ngcc'
  </code></pre>
  
  <p>Below is my package.json file</p>
  
  <pre><code>{
    "name": "ProjectDetails",
    "version": "0.0.0",
    "license": "MIT",
    "scripts": {
      "ng": "ng",
      "start": "ng serve --extract-css",
      "build": "ng build --extract-css",
      "build:ssr": "npm run build -- --app=ssr --output-hashing=media",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "^5.2.0",
      "@angular/common": "^5.2.0",
      "@angular/compiler": "^5.2.0",
      "@angular/core": "^5.2.0",
      "@angular/forms": "^5.2.0",
      "@angular/platform-browser": "^5.2.0",
      "@angular/platform-browser-dynamic": "^5.2.0",
      "@angular/platform-server": "^5.2.0",
      "@angular/router": "^5.2.0",
      "@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5",
      "aspnet-prerendering": "^3.0.1",
      "bootstrap": "^3.4.1",
      "core-js": "^2.4.1",
      "rxjs": "^5.5.6",
      "tslib": "^1.10.0",
      "zone.js": "~0.9.1"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "^0.803.1",
      "@angular/cli": "^8.3.1",
      "@angular/compiler-cli": "^5.2.11",
      "@angular/language-service": "^5.2.0",
      "@types/jasmine": "~2.8.3",
      "@types/jasminewd2": "~2.0.2",
      "@types/node": "~6.0.60",
      "codelyzer": "^5.0.1",
      "jasmine-core": "~2.8.0",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~2.0.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "^1.2.1",
      "karma-jasmine": "~1.1.0",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.1.2",
      "ts-node": "~4.1.0",
      "tslint": "~5.9.1",
      "typescript": "~2.5.3"
    },
    "optionalDependencies": {
      "node-sass": "^4.9.0"
    }
  }
  </code></pre>
  
  <p>My angular global version matches the angular/cli version in package .json. They both are 8.3.1. Below is the image for ng --version. I did both the command below, but still getting the same error:</p>
  
  <pre><code>npm uninstall -g @angular/cli
  npm install -g @angular/cli
  </code></pre>
  
  <p>any help will be higly appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/L2xPd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/L2xPd.png" alt="enter image description here"></a> </p>