cornflourblue / angular-7-role-based-authorization-example

Angular 7 - Role Based Authorization Example with Webpack 4
http://jasonwatmore.com/post/2018/11/22/angular-7-role-based-authorization-tutorial-with-example
MIT License
105 stars 110 forks source link

The serve command requires to be run in an Angular project, but a project definition could not be found. #2

Closed kamleshwebtech closed 5 years ago

kamleshwebtech commented 5 years ago

I have cloned the repository on my mac then installed npm to download required modules then run 'ng serve' command to run the application, it returns me an error like

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

Kindly help me how can i solve this issue and run your solution on my mac. Thank you so much in advance.

Ps. See attached screenshot. screenshot 2019-01-09 at 4 40 00 pm

sprakash1 commented 5 years ago

same error for me

cornflourblue commented 5 years ago

This project doesn't use the angular cli, it uses webpack directly. To start run the command npm start

aayush-18 commented 5 years ago

i have exactly the same issue. I cloned a repository of Barcode Scanner by Quagga. i did the ng install to download the necessary components but afterwards when i try to run ng build it is not working.

MU8T4Z4 commented 4 years ago

run command ( npm install) to update node models.

abhisheikreddy646 commented 4 years ago

while am getting this error "The serve command requires to be run in an Angular project, but a project definition could not be found" i tried npm install, and updated "ng update @angular/cli --migrate-only --from=1.7.3" still am getting this error .what is the solutions?

vrdevendra commented 4 years ago

Make sure you are in correct repository or opening correct folder. As shown in below attachment, you need to open that folder in angular. Capture

HomeroLara commented 4 years ago

@svdevendra yep, this worked. thanks!

khaldounjalem commented 4 years ago

@svdevendra Please, what exactly did you do?

vrdevendra commented 4 years ago

@khaldounjalem Nothing special, look closely error saying itself "The serve command requires to be run in an Angular project, but a project definition could not be found" it means that the command which you are trying to execute is run on angular project only so either you opened wrong project (other than angular) or wrong directory.

ranjitben10 commented 4 years ago

all solutions available here is not working for me

ranjitben10 commented 4 years ago

https://github.com/abhianshu2020/Hearti-Health download files from here and run it..

Ayesha-Mulla commented 4 years ago

Please check if node modules are installed properly. If yes, refresh node module folder and try running app in parent directory.

angulodev commented 4 years ago

@khaldounjalem Nada especial, mira de cerca el error diciéndose a sí mismo "El comando de servicio requiere ejecutarse en un proyecto angular, pero no se pudo encontrar una definición de proyecto", significa que el comando que está intentando ejecutar se ejecuta solo en un proyecto angular abriste un proyecto incorrecto (que no sea angular) o un directorio incorrecto.

excelente respuesta, muchas gracias

angulodev commented 4 years ago

para solucionar

cd (name app) luego ejecuta ng serve ** ng serve -o // asi levantas el navegador por defecto

Clinzho1996 commented 4 years ago

pls im having the same issue too its saying "The serve command requires to be run in an Angular project, but a project definition could not be found.

Clinzho1996 commented 4 years ago

but its sorted now. i opened the project folder then run the git bash, then "ng serve" and it worked perfectly.

lorran-mariuba commented 4 years ago

but its sorted now. i opened the project folder then run the git bash, then "ng serve" and it worked perfectly.

I did the same thing, but it's not working. I don't know what I have to do. I'm in the correct repository and the right project. Someone can help?

abvarunjain commented 4 years ago

This project doesn't use the angular cli, it uses webpack directly. To start run the command npm start

it works

ganeshsthube commented 3 years ago

Igot the error "The serve command requires to be run in an Angular project, but a project definition could not be found" in two different condition 1)when our project is just static and we are running this project in from different folder. solution :- Go to the same folder in terminal using "cd" command where our project is located.

2)When we clone dynamic project from github and then try to run "ng serve" command in terminal. At that time you will get same error Solution :-Run the ".sln" file using visual studio.

Dinuda commented 3 years ago

None of them work for me.

paulmunyao commented 2 years ago

This project doesn't use the angular cli, it uses webpack directly. To start run the command npm start

Hi I have run the same command but I'm getting an error sating electron not found Kindly advise