0

component

I am facing this issue, I am unable to generate the component in angular, I tried deleting node-modules, tried uninstalling angular cli, again installed.

2 Answers 2

0

Looks like your terminal recognize command differently? I see you have opened files ng,g,c and product-detail - are they opened/created after invoking this command?

Check here btw How to create a new component in Angular 4 using CLI

Sign up to request clarification or add additional context in comments.

7 Comments

When I hit the command for new components. its get created
well thats not good( make sure your terminal recognize "ng" as an angular cli. try ng help ng generate --help angular.io/cli#basic-workflow
btw how did you install cli?
npm install @angular/cli
oh try to add flag -g to make it global
|
0

It is possible that you have misconfigured something in the project, if you have not made much progress in the project I recommend the following (because it is not normal for you to have this type of problem)

First of all, sometimes VSC bugs, I close and open and everything is fine. If it does not work:

  1. Uninstall Angular
  2. Install Angular
  3. Remember if the packages are installed (NPM)
  4. ng generate component product-detail or ng g c product-detail
  5. Sometimes the solution to complex problems requires trying different ways to solve it, I hope this type of quick solution will help you.

remember: Download the extensions for angular, they will help you a lot. (Tell me how it's going)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.