Unable to update jhipster version - jhipster

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?

Related

node wont update angular

I have been struggling for days to try and get angular to update. I have finally narrowed it down to the fact when I run
ng new
it creates an angular app using version 1.7.4 but I have updated angular to version 8.1.2. when I run
ng --version
I get the message "your global version is 8.1.2 is greater than your local version 1.7.4 the local version will be uses"
I have run npm
npm update -g#angular/cli
npm update #angular/cli
but nothing. I have also deleted the files in
c:\users\user\appdata\roaming\npm\node_modules\#angular
and tried running
npm install #angular/cli
Has anyone got any idea either how to update my local install of angular or when I run
ng new
to get it to use the global version?
Thanks
npm update will update your package to the latest safe version, i.e. it won't increase a major version of your current package which is 1 in your case. A change of a major version means there will be breaking changes.
So you need to explicitly specify the package version to which you want to migrate. I.e. npm update #angular/cli#^8.1.2 or npm install #angular/cli#^8.1.2, sorry I mostly use yarn so not sure which of these 2 commands will work.

Yarn & Npm for Jhipster

I somehow have both yarn and npm for JHipster on my Linux Mint laptop. After I do the followings
yarn global remove generator-jhipster
yarn global add generator-jhipster
There isn't a result for
which jhispter
After I run the following commands
npm uninstall -g generator-jhipster
npm install -g generator-jhipster
an old version Jhipster shows up for
which jhispter
I have done an online search on the subject, but unable to resolve this problem after trying some methods mentioned on some posts.
How to get it right?
When confused about your local setup after installing JHipster through many ways (npm, yarn, linking from the sources, ...), I have found a way that works all the time. Recent version of NodeJs come with a useful tool called npx which can download a package from npm and execute it immediately. So the trick is simply to run:
npx generator-jhipster
You can also run a specific version, for example:
npx generator-jhipster#v5.3.4

Install Jhipster old version

I'm trying to install an old version of jhipster by using the following commands:
sudo npm install -g generator-jhipster#3.2
or
yarn global add generator-jhipster#3.2
with the same result:
"generator-jhipster#3.2.1" has no binaries
And
bash: jhipster: command not found
I have already tried the following commands without success:
yarn global add yo
and
export PATH="$PATH:yarn global bin:$HOME/.config/yarn/global/node_modules/.bin"
Please help me solve this problem.
You can't use the jhipstercommand with JHipster 3.x as it was introduced in version 4.x. You must run it as yo jhipster
You can read the archived documentation for version 3.2.1 at https://jhipster.github.io/documentation-archive/v3.2.1/
npm install -g generator-jhipster#**version**
First of all you have to install for example:
npm install generator-jhipster#2.23.1, then generate jhipster project by typing yo jhipster

Previously installed jhipster 3.12 found after yarn installed 4.0.6

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 :)

How to use latest JHipster version to generate my app?

I'm not (yet) familiar with the javascript stack but I'd like to use JHipster latest commit from master to generate my webapp.
How do I build locally generator-jhipster project and use it with yo jhipster?
You can use npm link 1 for that:
git clone git#github.com:jhipster/generator-jhipster.git
cd generator-jhipster
npm link
it will create a globally-installed symbolic link.
You can then use the generator on your system normally.
yo jhipster
just use it
1. sudo apt-get update
2.sudo npm install -g generator-jhipster
please before install jhipster confirm you have used sudo apt-get update
then it will work 100%
Thank you

Resources