Search code examples
node.jsmacosnpmyo

can't install "npm install -g yo" global only local.


im triying to install jhipster but I can't install

npm install -g yo

im getting this

Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version
✖ yo version

Your yo version is outdated.

Upgrade to the latest version by running:
npm install -g yo@latest


Found potential issues on your machine :(
+ [email protected]

but if I run

 npm install yo

im not getting any problem

im using npm -v 6.4.1 node -v v10.13.0 and macOS Mojave 10.14


Solution

  • I try a different way I run

    yarn global add yo
    

    then

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

    and

    yo jhipster
    

    now jhipster is finally working 😀