I have an old jhipster project that was generated using version 3.9.1 (originally), after having to work on it again the first thing I want is to upgrade jhipster to the latest version since there has been a lot of improvements.
I cloned the repo, installed everything necessary and tried to run the project. Everything worked ! so then I run yo jhipster:upgrade on the root folder of the project. After some permission problems and a few missing packages it finally did the upgrade but to version 3.12.2 instead of 4.6.1 (latest).
At this point I had to solve a few conflicts to get the project running again, no problem. I checked it and the version of my package "generator-jhipster" is indeed 4.6.1 (latest).
I've tried running the upgrade process a few times, even forcing the version with --target-version=4.6.1 but after the upgrade seemingly goes well the project is still running on jhipster 3.12.2.
I tried the solution here Jhipster yo jhipster is not updating existing project with no luck.
What am I doing wrong? or what are the steps to successfully upgrade? The upgrade page on jhipster's website is very vague...
Here is a typical upgrade log:
Welcome to the JHipster Upgrade Sub-Generator
This will upgrade your current application codebase to the latest JHipster version
Looking for latest generator-jhipster version...
New generator-jhipster version found: 4.6.1
Git repository detected
Updating generator-jhipster. This might take some time...
Updated generator-jhipster to version 4.6.1
Checked out branch "jhipster_upgrade"
Cleaned up directory
Regenerating app with jhipster 4.6.1...
██ ██ ██ ████████ ███████ ██████ ████████ ████████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ████████ ██ ███████ █████ ██ ██████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ████████ ██ ██████ ██ ████████ ██ ██
http://jhipster.github.io
Welcome to the JHipster Generator v3.12.2
Documentation for creating an application: https://jhipster.github.io/creating-an-app/
Application files will be generated in folder: C:\Users\quosei\Documents\GitHub\Agora
______________________________________________________________________________
JHipster update available: 4.6.1 (current: 3.12.2)
Run npm install -g generator-jhipster to update.
______________________________________________________________________________
This is an existing project, using the configuration from your .yo-rc.json file
to re-generate the project...
[A LOT OF FILE CHANGES (SKIPPED FOR READABILITY)]
Successfully regenerated app with jhipster 4.6.1
Committed with message "Generated with JHipster 4.6.1"
Checked out branch "master"
Merging changes back to master...
Merge done!
I'm all done. Running npm install && bower install for you to install the required dependencies. If this fails, try running the command yourself.
[NPM INSTALL && BOWER INSTALL RUN WITHOUT PROBLEM (SKIPPED FOR READABILITY)]
> yodoctor
Yeoman Doctor
Running sanity checks on your system
√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ Node.js version
√ No .bowerrc file in home directory
√ No .yo-rc.json file in home directory
√ npm version
Everything looks all right!
> [email protected] postinstall C:\Users\quosei\Documents\GitHub\Agora\node_modules\optipng-bin
> node lib/install.js
√ optipng pre-build test passed successfully
> [email protected] postinstall C:\Users\quosei\Documents\GitHub\Agora\node_modules\jpegtran-bin
> node lib/install.js
√ jpegtran pre-build test passed successfully
> [email protected] postinstall C:\Users\quosei\Documents\GitHub\Agora\node_modules\gifsicle
> node lib/install.js
√ gifsicle pre-build test passed successfully
> [email protected] postinstall C:\Users\quosei\Documents\GitHub\Agora\node_modules\spawn-sync
> node postinstall
added 1485 packages in 101.329s
[09:45:32] Using gulpfile ~\Documents\GitHub\Agora\gulpfile.js
[09:45:32] Starting 'install'...
[09:45:32] Starting 'inject:test'...
[09:45:33] Starting 'inject:vendor'...
[09:45:33] Starting 'ngconstant:dev'...
[09:45:33] Finished 'install' after 177 ms
[09:45:33] Finished 'ngconstant:dev' after 122 ms
[09:45:33] gulp-inject 33 files into karma.conf.js.
[09:45:33] gulp-inject 36 files into index.html.
[09:45:33] Finished 'inject:test' after 261 ms
[09:45:33] Finished 'inject:vendor' after 202 ms
[09:45:33] Starting 'inject:dep'...
[09:45:33] Finished 'inject:dep' after 6.74 μs
[09:45:33] Starting 'copy:languages'...
[09:45:33] Finished 'copy:languages' after 9.7 ms
[09:45:33] Starting 'inject:app'...
[09:45:33] gulp-inject 205 files into index.html.
[09:45:33] Finished 'inject:app' after 319 ms
[09:45:33] Starting 'inject:troubleshoot'...
[09:45:33] gulp-inject Nothing to inject into index.html.
[09:45:33] Finished 'inject:troubleshoot' after 12 ms
Upgraded successfully. Please now fix conflicts if any, and commit!
Thanks a lot !
jhipster_upgrade, see what has been done in the commit Generated with JHipster 3.12.2. - tan9jhipster_upgradedoes not exist anymore. I see some commits titled Generated with JHipster 4.6.1 with many changes followed by a merge into the master branch. Thank you :) - vicpermirmaster. - tan9