Error while running Angular project

Asked

Viewed 247 times

-4

I installed the angler: npm install -g @angular/cli and created a project. While trying to run ng serves I caught that mistake:

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

I’ve already updated ng update @angular/cli @angular/core and even with the update continues the message. I gave an ng v and received this:

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

Someone knows how I fix it?

Edit1

{ "Resource": "/c:/Projects/Nettestes/Nettestes/angular.json", "Owner": "generated_diagnostic_collection_name#1",
"Severity": 4, "message": "Property Nettestes is not allowed.",
"startLineNumber": 6, "startColumn": 5, "endLineNumber": 6, "endColumn": 16 }

  • Complementing only. In angular.json I have this: Property Nettestes is not allowed.

1 answer

0

To execute the command ng serve needs to be within the Angular design.

If the project is in the folder Documentos/AngularProject/ you need to execute the command inside the folder AngularProject/.

If command ng serve it is not recognized need to place it in the system’s global variables.

  • Filipe, I’m inside the project folder. No problem. It turns out that any project I create, I’ve created 3 now and all when I run(ng serves) gives me this error.

  • You can put the console error in more detail?

  • I edited the question and put what I get in the Problem tab, in the Debug Console tab comes nothing

  • The error is there in the property "Property Nettestes is not allowed."

  • And how do I fix this, Filipe, can you tell me? I’ve updated and yet it continues and this for every project I start

  • I uninstalled Angular, gave a clean cache and reinstalled and keeps giving the error

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.