Monday, August 26, 2019

Update old version Angular package to avoid Angular CLI error

When downloading angular package from git, running 
ng build
on the project 
or 
ng server 
on the demo app may get an error of 

Angular CLI Errorof "The serve command requires to be run in an Angular project, but a project definition could not be found". The reason of the error is the project was created using an old version of Angular CLI with the file name of .angular-cli.json.


To fix the issue, from the folder of .angular-cli.json, run the below command
ng update --all --force 

No comments:

Post a Comment