Andreas Notanto
Andreas Notanto

Reputation: 71

when download project from angular docs and running ng serve -o project definition could not be found

I am using Angular CLI: 8.1.2 and want to start learning it from Angular IO Tutorial and when i download the code and doing ng serve -o

It shows the error:

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

I've tried to update it but is not working because I am using the newer angular cli.

Angular File Project Project That I Have been downloaded from https://angular.io/start#getting-started-with-angular-your-first-app:

!File Project (https://drive.google.com/file/d/1h_ompEiWsNJ8O5n-xVf2y8Ap2e0GVlNi/view?usp=sharing)

My Angular CLI Version:

!Angular CLI (https://drive.google.com/file/d/18a-4yMrRFMcIv1cTHvZUf6RW79egOUVY/view?usp=sharing)

I expected chrome browser pop up and showing my web app.

Upvotes: 0

Views: 1245

Answers (3)

Andreas Notanto
Andreas Notanto

Reputation: 71

the answer for this question for all new angular 8 learner is to copy ng new to your stackblitz

Upvotes: 1

user11341611
user11341611

Reputation:

Your answer may be here. https://www.djamware.com/post/5bca67d780aca7466989441f/angular-7-tutorial-building-crud-web-application

npm install -g @angular/cli ng new angular-new cd angular-new ng serve

If any problem try this. npm install -g @angular/cli@latest and check your npm -v and node -v

Upvotes: 0

Zlatko
Zlatko

Reputation: 19569

You need to go to the folder in question.

So e.g. if you created your app like this:

ng new my-first-app

Now you need to first:

cd my-first-app

Then you can run

ng serve

Or

npm start

It will work.

Upvotes: 0

Related Questions