Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Angular 14: Error: A collection and schematic is required during execution

I am trying to learn angular. I installed the lastest version and created an app called test using ng new test command.

Then I opened the app in visual studio code. In the terminal I entered the following command to create a new component:
ng g form1

I get the following error:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Error: A collection and schematic is required during execution.

Please see the screenshot.
Please help. Thanks.

screenshot of error

>Solution :

https://angular.io/cli/generate

A schematic is the type of object you want to create, such as a service, pipe, directive, or component.

In this instance, you’re providing the name of what you want to generate (‘form1’) but not what kind of object.

You could run ng g c form1 to generate a form1.component, or ng g s form1 to generate a form1.service.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading