Yo can't find jhipster after the thread global add generator-jhipster

I am trying to create a jHipster project using yarn - https://jhipster.imtqy.com/installation/

I installed Node from my website and yarn using brew.

yarn version 0.19.1 node version v7.5.0 OSX Sierra 10.12.3

When I run yarn global add generator-jhipster , I could see that the jhispter generator is copied to / Users / {username} /. config / yarn / global / node_modules /

 my-mac:~ user$ yarn global add generator-jhipster yarn global v0.19.1 warning No license field [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... warning undefined has no binaries warning No license field ✨ Done in 30.68s. 

As a next step, when I run yo jhipster , it cannot find jhipster. However, when I run yarn add generator-jhipster , yo can find jhipster from the current folder. Not sure what happened with the add in global location.

 my-mac:~ user$ echo $PATH /usr/local/sbin:~/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/Cellar/node/7.5.0/bin:/Users/{user}/.config/yarn/global/node_modules/.bin 

Thank any help in determining what is happening, or if there is a problem with the latest version of yarn.

 my-mac:~ user$ yo jhipster Error jhipster You don't seem to have a generator with the name "jhipster" installed. 
+6
source share
2 answers

I had the same problem and the reason was my laziness. I did not find the time to read Local installation with Yarn documentation notes:

Note. If you have a problem using these tools all over the world, make sure you have $ HOME / .config / yarn / global / node_modules /. bin in your path.

On Mac or Linux: export PATH="$PATH:$(yarn global bin):$HOME/.config/yarn/global/node_modules/.bin"

+6
source

To solve this problem, I needed to install yoman globally with yarn.

 yarn global add yo 
+2
source

Source: https://habr.com/ru/post/1014864/


All Articles