How to use latest JHipster version to generate my app? - jhipster

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

Related

How to update my Project with my new NPM version?

How are you all?
I'm really new at this. I'm having trouble deploying my react project. When I do it, the entire website is blank. Someone said to me that I should update my Node and my NPM. That leads me to the first question: "When I update the NPM, I'm updating Node at the same time, right?"
So I researched and found this command:
npm cache clean -f
sudo npm install -g n stable
And I think that updated my NPM.
Done that, I ran the GIT STATUS to see if something were modified in my project. Nothing.
But that leads me to my second question: "Cool... but now I have to update my project with my new NPM version, right?"
I tried:
NPM UPDATE
But then i checked my git status again and nothing was modified. How can I update it?
Thanks guys. I really hope I did this right.
First of all, you have to understand npm & node is the environment to run the projects on your computer (local). It's global and not belong to any project. So if you install or update global, it won't affect your project (specific on your working copy git) because it's the global, and only is the environment to run, you can check dependencies on your package.json file.
If you wanna update node to latest:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
update npm to latest version: npm install npm#latest -g

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

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?

NPM package has outdated dependency, is there a way to alter its version?

Just migrated to Node 4.1.2 from 0.10. One of the packages being installed via npm install errors due to node-gyp having a problem with one of its dependencies, it's quite a few versions out of date. The issue has been brought up on the repo but hasn't seen activity since May. Is there a way to tell NPM to install this package but with the outdated dependency using a newer version?
EDIT:
I've copied over an installed version from node_modules in an older project. npm install -g npm-check-updates then ncu in the node_modules/bs-html-injector/ directory. It lists updates, ncu -u will update the package.json, npm install after. I run my gulp task and html is injecting fine, all seems fine :) Would still like to know how to do this if I didn't have a local copy installed by NPM. It looks like it's just a 1:1 copy from the github repo?
With npm, you can install packages from GitHub directly:
npm install user/repo#branch
You can fork the package on GitHub, make and propose the changes you need and use your fork as a dependency in your project until PR is merged.
you can use --force to force install it

Resources