Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

angular

I've upgraded my project to Angular 6, and everything went fine except the conversion of .angular-cli.json file. From the guide I followed, it was said that this will convert it automatically.

npm install -g @angular/cli

npm install @angular/cli

ng update @angular/cli

However, it was not the case as I still have the old .angular-cli.json

Is there a way to do it automatically / manually?

like image 870
Dino Avatar asked May 08 '18 11:05

Dino


People also ask

How do I migrate from Angular 6 to Angular 11?

You can run ng add @angular/localize to include required packages. Finally, run ng update @angular/core @angular/cli command to update to Angular 11. This will migrate your project to latest Angular release. After the update to Angular 11 is done your project will be using Typescript 4.

How do I migrate from Angular 7 to 9?

You can optionally pass the --create-commits (or -C ) flag to ng update commands to create a git commit per individual migration. Run NG_DISABLE_VERSION_CHECK=1 npx @angular/cli@9 update @angular/core@9 @angular/cli@9 which should bring you to version 9 of Angular.


1 Answers

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.

like image 139
Kyle Krzeski Avatar answered Sep 21 '22 16:09

Kyle Krzeski