but a project definition could not be found

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

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

We can fix this error by running the following command:


Go to the project directory and execute the command to Uninstall global:

           >> npm uninstall -g angular-cli


Then, Reset Cache:

           >> npm cache clean


Then, Install latest CLI:

         >> npm install -g @angular/cli@latest

 

Note: You don’t need to this command [npm cache clean –force], if you don't have any problem during the installation.


ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..
My Blogs - https://code-sample.com and https://code-sample.xyz
My Book1 - BEST SELLING ANGULAR BOOK (INCLUDING ALL VERSIONS 2, 4, 5, 6, 7)
My Book2 - ANGULAR 2 INTERVIEW QUESTIONS BOOK - Both Books are Available on WorldWide.

www.code-sample.com/. Powered by Blogger.
^