Today I checked my angular version by using
ng -v
It showed
Angular cli 1.0.0-beta.28.3
I uninstalled this version using
npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
rmdir -rf node_modules dist
npm cache clean -- force
Then I installed node js new version 12.18.1 . Later I installed new version i.e. 9 version of angular using this .So currently I have version
Angular CLI: 9.1.9
Node: 12.18.1
---------------------------------
Then I ran on my node terminal the following commands
npm install -g @angular/cli@latest
npm install --save-dev @angular/cli@latest
And at the end using
npm install
When I run the angular project I get the error The serve command requires to be run in an Angular project,but a project definition could not be found.
I have checked over stack overflow and found that I should use npm start
but I want to keep using ng serve
.I can't migrate to higher version because its version 9 with me now.Should I uninstall angular again.but I tried it several times and still I'm getting the same error.
Please help me .
P.s. sorry everyone I'm repeating the question on stack overflow but I need help , and other answers are not solving my error.
Thanks