[angular] How to upgrade Angular CLI to the latest version

In addition to @ShinDarth answer.

I did what he said but my package did not updated the angular version, and I know that this post is about angular-cli, but i think that this can help too.

  • so after doing what @ShinDarth said above, to fix my angular version I had to create a new project with -ng new projectname that generated a package.
  • copy the new package, then paste the new package on all projects packages needing update (remember to add the dependencies you had and change the name on first line) or you can just change the versions manualy without copy and paste.
  • then run -npm install.

Now my ng serve is working again, maybe there is a better way to do all that, if someone know, please share, because this is a pain to do with all projects that need update.

Examples related to angular

error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class error TS1086: An accessor cannot be declared in an ambient context in Angular 9 TS1086: An accessor cannot be declared in ambient context @angular/material/index.d.ts' is not a module Why powershell does not run Angular commands? error: This is probably not a problem with npm. There is likely additional logging output above Angular @ViewChild() error: Expected 2 arguments, but got 1 Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class' Access blocked by CORS policy: Response to preflight request doesn't pass access control check origin 'http://localhost:4200' has been blocked by CORS policy in Angular7

Examples related to angular-cli

Why powershell does not run Angular commands? ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead Angular CLI Error: The serve command requires to be run in an Angular project, but a project definition could not be found Could not find module "@angular-devkit/build-angular" How to remove package using Angular CLI? How to set environment via `ng serve` in Angular 6 Error: Local workspace file ('angular.json') could not be found How do I deal with installing peer dependencies in Angular CLI? How to iterate using ngFor loop Map containing key as string and values as map iteration how to format date in Component of angular 5