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

971 views
Skip to first unread message

Paulo Silva

unread,
Jul 29, 2020, 6:38:43 AM7/29/20
to Angular and AngularJS discussion
I created a new project in Angular and when i try to run(ng serve) i get this error:
The serve command requires to be run in an Angular project, but a project definition could not be found.

I enter ng v and i get this 

C:\Projetos\Netflix>ng v
     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 10.0.4
Node: 10.16.3
OS: win32 x64
Angular:
...
Ivy Workspace:
Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1000.4
@angular-devkit/core         10.0.4
@angular-devkit/schematics   10.0.4
@schematics/angular          10.0.4
@schematics/update           0.1000.4
rxjs                         6.5.5

How can i solve this issue? 

Sander Elias

unread,
Jul 29, 2020, 6:44:00 AM7/29/20
to Angular and AngularJS discussion
I never heard of this issue.

its something like:
```
ng new myNewProject
cd myNewProject
ng serve
```

Op woensdag 29 juli 2020 om 12:38:43 UTC+2 schreef pja...@gmail.com:

Paulo Silva

unread,
Jul 29, 2020, 10:26:43 AM7/29/20
to Angular and AngularJS discussion
Yes Sander, you are correct. I created two folders called Netflix and my full path was: C:\Projetos\Netflix\Netflix and when i was called my project i did: C:\Projetos\Netflix -> ng serve -o. I was doing wrong. 
Reply all
Reply to author
Forward
0 new messages