ng serve is not working after Angular 8 update

Here's what finally worked for me, from my project folder

nvm use 10.14.1
rm -rf node_modules dist
npm install --save-dev @angular/cli@latest
ng update --all --force --allow-dirty
npm install --save [email protected]

You may have to resolve other dependencies, depending on the packages used by your application.


Solution

After upgrading to Angular 8

problem may occur

      ng update --all
    Using package manager: 'npm'
    Collecting installed dependencies...
    Found 58 dependencies.
                      Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.4 <3.5", would install "3.5.2")
                      Package "@angular-devkit/build-angular" has an incompatible peer dependency to "typescript" (requires ">=3.1 < 3.5", would install "3.5.2")
                      Package "angular2-datatable" has an incompatible peer dependency to "@angular/common" (requires "^2.0.0" (extended), would install "8.0.1").
                      Package "@angular/http" has an incompatible peer dependency to "@angular/core" (requires "7.2.15", would install "8.0.1")
                      Package "angular2-datatable" has an incompatible peer dependency to "@angular/core" (requires "^2.0.0" (extended), would install "8.0.1").
                      Package "angular2-datatable" has an incompatible peer dependency to "@angular/platform-browser" (requires "^2.0.0" (extended), would install "8.0.1").
                      Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.4 <3.5", would install "3.5.2").
                      Package "angular2-datatable" has an incompatible peer dependency to "rxjs" (requires "^5.0.0-beta.12", would install "6.5.2").
    Incompatible peer dependencies found. See above

Solution for these error

ng update --all --force

Then error

   ERROR in The Angular Compiler requires TypeScript >=3.4.0 and <3.5.0 but 3.5.2 was found instead.

npm install typescript@">=3.4.0 <3.5.0" --save-dev --save-exact

        Just to be sure run the following steps:

        npm uninstall -g @angular/cli
        npm cache verify
        npm install -g @angular/cli@latest
        Then in your Local project package:

        rm -rf node_modules dist 
        npm install --save-dev @angular/cli@latest
        npm i 
        ng update @angular/cli 
        ng update @angular/core

will fix the issue