I have a new project, but when execute ng serve, I get error

后端 未结 6 1845
予麋鹿
予麋鹿 2021-02-02 15:12

I need to change this topic, I cant post new topic. I have update the script, and install new package. I still get errors but not the one I post last.

                    


        
6条回答
  •  被撕碎了的回忆
    2021-02-02 15:31

    Angular 6 looks for angular.json instead of angular-cli.json.

    You need to update your @angular/cli. Adding to the above answer

    I did update all the package with the following commands and updated all dependencies too. So as to remove all compatibility issues with other packages.

    If you are starting your app or demo app, follow this procedure. Be extra careful if you are doing this for production app.

    npm install -g npm-check-updates
    ncu -u
    ng update @angular/cli
    npm install
    

    Install npm-check-updates

    npm install -g npm-check-updates 
    

    Use ncu to update your package.json

    ncu for display

    ncu -u for re-writing your package.json

    Update your @angular/cli to modify your application to be compatible with angular 6

    ng update @angular/cli 
    

    and run npm install to update your packages

提交回复
热议问题