5

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?

Dante
  • 123
  • 1
  • 12
  • looks similar to https://github.com/jhipster/generator-jhipster/issues/6566; related to https://github.com/angular/angular-cli/issues/7960. see the comments there for possible workarounds – lena Jan 18 '18 at 19:21
  • Why not use angular-cli from your command line as described in official docs: http://www.jhipster.tech/using-angular ? – xsalefter Jan 19 '18 at 02:52
  • Please try this approach [stackoverflow.com/a/53696599/2668045](https://stackoverflow.com/a/53696599/2668045) Should be ok. – Arif Dewi Dec 09 '18 at 21:00

1 Answers1

2

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

petre
  • 508
  • 7
  • 9