Dante
Dante

Reputation: 123

How to create new angular component in jhipster

I have created a new project using jhipster and imported it into Intellij. When i try to create a new angular component i get an error.Here is what i did:

File >> New >> Angular cli >> component > ok.

I get the following error:

C:\Program Files\nodejs\node.exe" D:/TestareJhipster/Testare1/node_modules/@angular/cli\bin\ng generate component cacat
Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule.
Error: Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule.
Done

Is there another way to create a component?

Upvotes: 5

Views: 6143

Answers (1)

petre
petre

Reputation: 508

Another way with JHipster is to run:

jhipster entity yourEntityName --skip-server

From JHipster official documentation ( http://www.jhipster.tech/creating-an-entity/ )

This will skip the server-side code and will generate only the client-side code.

Alternatively this answer might help you as well: https://stackoverflow.com/a/46269000/2815598

Upvotes: 2

Related Questions