0
I started a new angular design, it works well for me when I use:
npm start
However, I’m trying to use
ng serve
So I tried that:
npm uninstall --save-dev angular-cli
npm install --save-dev @angular/cli@latest
However, I am getting this error even when I run the command:
ng --version
An invalid Configuration file was found ['/home/Edson/.angular.json']. Please delete the file before running the command.
Does anyone know why this is happening?
Did you install it globally as well? With command:
npm install -g @angular/cli
. Since version 6.x angular-cli has used the.json angular file instead of . angular-cli.json you have which one of them?– Patrick Lima
Now this error is appearing "The serve command requires to be run in an Angular project, but a project Definition could not be found."
– Edson Cezar
https://www.npmjs.com/package/@angular/cli#updating-angular-cli
– Eduardo Vargas
If you update the angular-cli to verses 6> you have to update your project tbm to be compatible.
– Eduardo Vargas
@Edsoncezar this is a problem that has been happening but in
angular-cli
7, you can follow here https://github.com/angular/angular-cli/issues/12198 but in short, it happens when there is a file.angular.json
in some root directory of yours, e.g.: C:// or your user, etc.– Patrick Lima