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.
I am using ionciv1, in the file
ionic.config.json
delete the angular type key and it worked correctlyexample:
solved
As Usman said, i had a lot of trouble first time, I was following a tutorial. I had not set my directory to the project directory hence got this error.
I solved the issue by
cd myproject
ng serve
That was it.
Solved. I was getting same issue on ubuntu 18.04.01 LTS. No above options worked as I was using NVM (Node Version manager.) Solution is
before creating project,use command
nvm use 10
(my node version was 10.15.0, so I used "nvm use 10")
It will show you output-
Now using node v10.15.0 (npm v6.4.1)
Versions will vary as per individual systems. then create new project.
if you have downloaded a project,do in the project
The same problem I came across, but I solved by following these steps of code.
Make sure you have set the new angular version configuration in your project. The new angular cli uses angular.json and not .angular-cli.json for its configuration.
Follow migration guide.