Angular 6 Migration -.angular-cli.json to angular.json

Most likely there were errors in one of those commands. For me, I had to run npm install -g @angular-devkit/core first and then run the commands:

npm install -g @angular/cli

npm install @angular/cli

In the console output of npm install @angular/cli you should see:

================================================================================
The Angular CLI configuration format has been changed, and your existing configuration can
be updated automatically by running the following command:

  ng update @angular/cli
================================================================================

Then you obviously should run ng update @angular/cli to finish off the process.

See the Official Update Guide for additional details.


you can automatically update your existing angular-cli.json file to angular.json file by using the below command provided that you are on v6.x.x or greater of angular cli command line tool.

ng update @angular/cli --from=1.7.4 --to=6 --migrate-only

In the above command 1.7.4 is the previous cli version you were using. The --migrate-only flag makes sure that it will only perform a migration but does not update the installed version. Use --to instead of @angular/cli@6 because of https://github.com/angular/angular-update-guide/issues/64.

read more: angular/cli-github

Tags:

Angular