Search code examples
angularangular6angular-cliangular7angular-cli-v7

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


I downloaded Angular Formio project. The project is in angular 6 version. I want to completely migrate this project into angular version 7 and use this features in my project which is on angular version 7. but before I need to run the project and access it on localhost, make some changes and test it.

I am getting the below error when I run ng serve from the command line:

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

I am unable to fix it. Below are the steps that I have followed after downloading the project and to update my angular CLI

npm install
npm audit fix
npm install -g @angular/cli
ng update @angular/cli

I'm still facing the same issue.

project structure

Please help. thanks in advance.


Solution

  • The angular.json is missing. The cli needs this file. To elaborate on this a bit more: The projects seems to not use the angular cli but gulp combined with npm tasks instead. Refer to the developer documentation of that project.