I have created a project using Jhipster v4.0.5. Now have upgraded generator-jhipster to latest one i.e. v4.0.7 and tried to upgrade my existing project manually. But upgrade is not happening because no single file is changed after using command yo jhipster or yo jhipster --with-entities.
Have confirmed this through '.yo-rc.json', it is still showing {"jhipsterVersion": "4.0.5"}.
Does anyone know fix for this issue ?
You're probably using the generator-jhipster in your project's node_modules folder, delete it and re-run npm install or yarn install.
Why don't you use yo jhipster:upgrade rather than re-generating everything and losing all your customizations? See documentation
Related
I am using Dependabot to automatically update my dependencies.
How can I update the local packages to the new version?
Currently, I am deleting the whole node_modules folder and running npm install to make sure I have the latest version installed.
Is there an easier way?
You don't need to delete your node_modules. Running npm install should upgrade the modules that need upgrading itself.
I'm using the latest version of jHipster (7) and I have a problem when I try to generate an entity with jhipster entity command. It says that a node-module is missing :
Cannot find module 'ajv/dist/compile/context'
And when I look at some project I've generated with an other version of jHipster, I can find this file. I think it's a pb with the new version as it's the first time I have this pb...
I tried to find the missing file on internet, but i don't find it.
For anyone looking for the workaround for this issue in jhipster version 7 :
you can find it here :
Workarounds:
1. npm install -g npm#latest (Or just downgrade npm version at pom.xml)
2. Recreate package-lock/node_modules
3. rm -rf package-lock.json node_modules
4. npm install
source : comment github link
After installing yarn (0.20.3) for the very first time, yo (1.8.5), generator-jhipster with yarn global add generator-jhipster#4.0.6 and extend the $PATH as mentioned by the installation guide, the new version of jhipster istn't used. Instead, the jhipster 3.12.1 is found, which was always installed by node/npm.
yo is taken from $HOME/.config/yarn/global/node_modules/.bin
jhipster 4.0.6 is installed in $HOME/.config/yarn/global/node_modules/generator-jhipster
What should I do, that yo takes the latest jhipster installation?
I had the same issue when switching from npm to yarn.
Somehow "yo" still uses npm.
This solved the problem for me:
npm uninstall -g generator-jhipster
npm uninstall -g yo
If you were previously using NPM before Yarn, this question/answer would probably be relevant and helpful -- goes through the process of removing all of NPM's managed packages and not just for yo and generator-jhipster:
Yarn package won't upgrade globally (after migrating from NPM)
I decided to refuse using yarn and all problems disappeared :)
I have a project in sails with nodejs version 0.12.7 I would like to update my project to node 7.0.0
You shouldn't have to upgrade your project. You just need to upgrade Node. Here's a tutorial on how to install a new version of Node alongside the old version, so that if anything doesn't work with the new one, you can switch to the old one.
I'd suggest copying the project to some other place, cleaning node_modules and doing npm install to see how it works.
You may get problems with new versions of npm modules if their API changed so you may need to specify exact versions of modules that are known to work in your package.json.
Currently I am using Jhipster 2.23.0 version but 2.23.1 is available so tried to update Jhipster using npm update -g generator-jhipster but still when i do yo jhipster it shows 2.23.0 version.
I have also recently update my JHipster application. To be sure that your generator is updated check first if the version you want, got installed properly:
npm list generator-jhipster
After that yo jhipster will update your application.
As a hint allways read the releas notes:
http://jhipster.github.io/releases/
it can save you a lot of time.
cheers,
duderoot
Try the following command
npm update -g generator-jhipster#2.23.1
I'm using the latest 2.26.2 now and with no issues. When yo changes, you will be notified to update. I just did:
npm install -g yo
and then ...
npm install -g generator-jhipster
JHipster is a Yeoman generator so I assume that yo needed update first. Has your issue been remedied?