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 Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

The serve command requires to be run in an Angular project, 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 Reviewed by Anil Singh on 2:20 PM Rating: (5)
www.code-sample.com/. Powered by Blogger.
^