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

前端 未结 8 1799
北荒
北荒 2020-12-04 16:37

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 th

8条回答
  •  无人及你
    2020-12-04 16:56

    Please follow these steps :

    1) Update your Angular CLI globally and locally (assuming latest version to be 7)

    2) Take your old project and run following command

    • npm install @angular/cli
    • ng update @angular/cli

    After running this you have updated all your angular packages to the latest version.

    3)Add this package as it is still missing

    npm install @angular-devkit/core --save -dev

    4) create a fresh new project with ng serve (latest version)

    5) Create a new empty file with name angular.json and copy the content of angular.json from the new project into it.

    6) Update the name of project accordingly in angular.json

    7) Run npm install

    8) Run ng serve

    9) You are now ready with the latest version of angular.

    I followed the above steps to migrate from angular2 to angular7.

提交回复
热议问题