Install Jhipster old version - jhipster

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

Related

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

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

Fresh install of npm and node

I have recently started working with Angular 2 and am unable to get the Angular 2 Quickstart project to run correctly due to a number of errors in my npm dependencies.
Am I able to globally uninstall everything that was previously installed with npm to allow me to do a clean install of it and any required dependencies?
Note: The errors are the same as these examples which are caused by packages needing to be installed globally, however, the errors still occur having followed these steps...
To check your global installed packages you can type:
npm ls -g --depth=0
That lists all global installed packages with depth=0. That mean that it doesn't output dependencies of the packages. You can uninstall global packages with:
npm uninstall -g package-name
Please do not uninstall the npm package itself... But you can update your npm version with npm:
npm install npm -g
As mentioned in the Article your Node.js version should be at least v4.x.x and the npm version should be v3.x.x. You can get the installed versions with these commands:
node -v
npm -v
Updating your Node.js depends on your Operating System. Assuming that you use Windows you should uninstall the current version via control panel and download an actual release from the official Node.js page. https://nodejs.org/en/download/current/
To get a great overview how npm works you should consider reading their
documentation: https://docs.npmjs.com/
Make sure you have the correct node.js version. The guide says 5.0 or greater but points you to the wrong download link.
Try this: https://nodejs.org/en/download/current/
With this node you should be able to follow the guide step by step.

Unable to update jhipster version

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?

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