Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update the JHipster project after updating JHipster generator?

I updated my JHipster installation as per this page by running the command

npm update -g generator-jhipster

But to update my application I am not sure where should I run the next command yo jhipster.

I tried running it from the root of existing project, but it asked me to enter the name of the new project.

Jhipster console

I tried running it at one level above the root of existing project, then also it asked me the name of the new project. But this time I entered the same name and the jhipster generation process ran. However there was no change in any of the major files like package.json or Gruntfile.js or bower.json

What is the correct way to update a JHipster project, once the JHipster generator is updated?

like image 277
Dhanush Gopinath Avatar asked Mar 27 '14 07:03

Dhanush Gopinath


People also ask

How do you regenerate entities in JHipster?

You can generate entities from a JDL file using the jdl sub-generator, by running jhipster jdl your-jdl-file. jh . If you do not want to regenerate your entities, while importing a JDL, you can use the --json-only flag to skip entity creation part and create only the json files in . jhipster folder.

How do I find my JHipster version?

When you run yo jhipster this is written in yellow in the welcome message. This prints out the version installed on the system, not the version used to generate the project, though.


2 Answers

JHipster developers replied over twitter saying that yo jhipster has to be executed at the project root folder.

like image 176
Dhanush Gopinath Avatar answered Nov 02 '22 19:11

Dhanush Gopinath


Following [jhipster releases] (https://jhipster.github.io/2015/05/31/jhipster-release-2.14.2.html): How to upgrade

Update your version of JHipster with:

npm update -g generator-jhipster

And then you can update your project when you run again

yo jhipster

You can also update your entities by running again the entity sub-generator, for example if your entity is named Foo

yo jhipster:entity Foo 
like image 40
alpoza Avatar answered Nov 02 '22 21:11

alpoza