Updating JHipster does not work.
I want to use the most up-to-date version.
Run yo jhipster. A new version is available. Run npm install -g generator-jhipster. Open a new terminal. Run yo jhipster. The version is not updated. A video showing the steps can be seen here: https://www.youtube.com/watch?v=8OV3Mf2gCW4 (Note: This does not showcase the bug, only the update steps).
No.
Make the update work as expected so running an update with v4.14.2 installs v4.14.3 and uses it from that moment.
v4.14.2
None.
entityName.json files generated in the .jhipster directoryNone.
Windows 10 64bit.
That's normal, because you use the version local to your project, and the global one. Have a look at the documentation, probably the jhipster upgrade sub-generator is what's best for you (that mostly depends if that's a major or minor upgrade).
Just to give some background: we do this for people who have multiple JHipster projects. You might not want to upgrade them all at once. So we use the project-local version, and the global one is ignored, unless of course you force it.
False. I have no project setup. The folder is empty and I cannot update the version. Please let me know why it doesn't work. It always stays at v4.14.2.
Then it totally depends on how you install it - we have guidelines for bugs, please give more information, we can't work like that. Are you using Chocolatey?
No. I just use npm. It's described above under Reproduce the error. I'm not sure what would be missing on how to describe the installation and upgrade procedure.
Yes but you could have installed with Chocolatey, and then try to upgrade with NPM... which would in fact work.
So can you run jhipster info, so we know your configuration?
Here is the jhipster info output:
Using JHipster version installed globally
Executing jhipster:info
Options:
D:\Programs\Source Codes\Java\IntelliJ\Test
`-- (empty)
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
entityName.json files generated in the .jhipster directory
JDL entity definitions
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
git version 2.6.1.windows.1
node: v9.11.1
npm: 5.6.0
bower: 1.8.0
gulp:
[23:04:00] CLI version 3.9.1
yeoman: 2.0.1
yarn: 1.5.1
Congratulations, JHipster execution is complete!
@BullyWiiPlaza the video you refer to is 2 years old and uses JHipster 3. Since we no longer use yo jhipster please use jhipster without yo .
Also you use JDK 9 which is not supported by JHipster 4.
You're using a non-LTS Node version, and we always recommend to use an LTS version.
What happens when you do npm install -g generator-jhipster, do you have a log? Please note we recommend Yarn, we have only about 5% of users using NPM (so combining Windows + non-LTS NodeJS version + NPM means you are probably a bit alone..)
You ran jhipster info in an empty dir it seems as there's no .yo-rc.json and there's no version printed which could mean that node_modules sub folder is empty.
Please start from scratch, create an empty directory and generate a project here using jhipstercommand.
Even without using yo, it still does not update whatsoever. Here is the terminal output:
D:\Programs\Source Codes\Java\IntelliJ\Test>npm install -g generator-jhipster
C:\Users\User\AppData\Roaming\npm\jhipster -> C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster\cli\jhipster.js
> [email protected] postinstall C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster
> opencollective postinstall
*** Thank you for using generator-jhipster! ***
Please consider donating to our open collective
to help us maintain this package.
https://opencollective.com/generator-jhipster/donate
***
+ [email protected]
updated 1 package in 20.957s
D:\Programs\Source Codes\Java\IntelliJ\Test>jhipster
Using JHipster version installed globally
Running default command
Executing jhipster:app
Options:
โโโ โโโ โโโ โโโโโโโโโ โโโโโโโโ โโโโโโโ โโโโโโโโโ โโโโโโโโโ โโโโโโโโ
โโโ โโโ โโโ โโโโโโโโโ โโโโโโโโโ โโโโโโโโ โโโโโโโโโ โโโโโโโโโ โโโโโโโโโ
โโโ โโโโโโโโโ โโโ โโโโโโโโโ โโโโโโโ โโโ โโโโโโโ โโโโโโโโโ
โโโ โโโ โโโโโโโโโ โโโ โโโโโโโโ โโโโโโโ โโโ โโโโโโโ โโโโโโโโ
โโโโโโโโโ โโโ โโโ โโโโโโโโโ โโโ โโโโโโโโ โโโ โโโโโโโโโ โโโ โโโโ
โโโโโโโ โโโ โโโ โโโโโโโโโ โโโ โโโโโโโ โโโ โโโโโโโโโ โโโ โโโ
http://www.jhipster.tech
Welcome to the JHipster Generator v4.14.2
_______________________________________________________________________________________________________________
If you find JHipster useful consider supporting our collective https://opencollective.com/generator-jhipster
Documentation for creating an application: http://www.jhipster.tech/creating-an-app/
_______________________________________________________________________________________________________________
Application files will be generated in folder: D:\Programs\Source Codes\Java\IntelliJ\Test
WARNING! Java 1.8 is not found on your computer. Your Java version is: 9.0.1
______________________________________________________________________________
JHipster update available: 4.14.3 (current: 4.14.2)
Run yarn global upgrade generator-jhipster to update.
______________________________________________________________________________
? Which *type* of application would you like to create? (Use arrow keys)
> Monolithic application (recommended for simple projects)
Microservice application
Microservice gateway
JHipster UAA server (for microservice OAuth2 authentication)
D:\Programs\Source Codes\Java\IntelliJ\Test>
I'm updating, it says that v4.14.3 is installed but then it always goes back to v4.14.2.
Edit: Thank you for the additional tips, I will try them.
Maybe you have Node installed twice, or a mix of npm/yarn... It's hard to tell, but that's an npm install problem, clearly.
(and I'm not saying it's easy, it took me very long to have something nicely setup on my Mac)
Yes generator-jhipster being installed twice by both yarn and npm would result in this situation, I had this also on Windows. Another hypothesis is a bad PATH.
Try running yarn global remove generator-jhipster and npm uninstall -g generator-jhipster then re-install it with the one you want and stay with it.
Yeah, @gmarziou your last message solved it. Thank you.
So finally, your PC is not haunted, I began to think so after your issue with H2 ๐
@gmarziou your advice is great, works perfect. I have same problem, locked on 4.14.2. cannot upgrade. Thanks a lot. save a lot of time.
Most helpful comment
Yeah, @gmarziou your last message solved it. Thank you.