Error - The serve command requires to be run in an Angular project, but a project definition could not be found Root Cause - When there is no project definition file in your project then you will see this error when you will run ng-serve or ng-build commands. Project definition file - In Angular project definition file is generated when you create new application or upgrade existing application. In Angular versions lesser than 6 this file name is .angulat-cli.json and in Angular version 6 and above it's name is angular.json . Solution - So while running the angular build or run commands make sure you have correct project definition file. If you are upgrading your application from Angular 5 or lesser versions to Angular 6 and greater versions then you need to run below command to generate new project definition and other related files. ng update @angular/cli // run it twice, If it's not generating then again try to run below commands in same sequence....
Comments
Post a Comment