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.
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.
It was silly me but need to leave comment maybe I save someone else some hassle. Same message happens if you multitask and have multiple projects so some of project is nested inside project folder like
projectFolder/subProject/projectOne
so I was inprojectFolder/subProject
trying to run commandng serve
.Make sure you are in correct folder because same error will occur if you are in wrong folder and conf and build is missing!
You can update the angular with command 'ng update --all'. It will take time but make sure your all components are up to date.
Make sure you have created angular App using below command, then running ng serve in created Project folder.
This happens because we are hitting ng serve command in some other path.This can be solved by hitting ng serve or npm start command on the path where exactly the our project resides(take path until the folder which contains src,node_modules,etc.)
F:\project\AngularDemo\AngularDemoapp> ng serve
make sure that you are running the command in the application root folder..
In your Package Manager Console run the command
then you can try to run the command there.For instance