Angular CLI Error: The serve command requires to be run in an Angular project, but a project definition could not be found

Gurpreet Singh picture Gurpreet Singh · Nov 1, 2018 · Viewed 434.3k times · Source

When running the terminal commands ng server or ng serve --live-reload=true, I'm getting this issue:

The serve command requires to be run in an Angular project, but a project definition could not be found.

Answer

Lakhwinder Singh picture Lakhwinder Singh · Nov 1, 2018

I was also getting this issue and solved by running below command.

ng update @angular/cli --migrate-only --from=<WhateverVersionYouAreCurrentlyOn>

e.g.

ng update @angular/cli --migrate-only --from=1.7.3

getting ref from here