Generator-jhipster: After installing Yeoman, getting "'yo' is not recognized as an internal or external command, operable program or batch file." error

Created on 6 Apr 2017  Â·  12Comments  Â·  Source: jhipster/generator-jhipster

  1. I am new to jhipster. Started with Installation. Followed the below steps,

Install Java 8 from Oracle.
Install Git from https://git-scm.com.
Install Node.js from http://nodejs.org. I used Node 6.9.1 to write this article.
Install Yarn using the Yarn installation instructions.
Run the following command to install Yeoman.
yarn global add yo
Since JHipster 4 is not released yet, you'll need to clone its GitHub repository to create a project with it.

git clone https://github.com/jhipster/generator-jhipster
After cloning it locally, you'll need to run npm link in the generator-jhipster directory so npm knows to use your local copy instead of trying to download and install it.

And tried to create a new project, with the command "Yo Jhipster", i am getting the following error.

'yo' is not recognized as an internal or external command,
operable program or batch file.

Most helpful comment

I tried all, installing ruby, even reinstalling and installing it. But none of them worked.

Try installing yo with yarn yarn add global yo and it worked finally

All 12 comments

It's not a bug. You must run npm link generator-jhipster inside the directory where you want to create an application.
I suggest you to try and go to the jhipster gitter to ask for help for such cases or confirm it's a bug before opening an issue.

I did as you said, still stuck with the same issue

@AmsaveniMidhun If you are using yarn, you should use yarn link generator-jhipster instead.

@PierreBesson Is thats the isse? i thought It can be linked either using npm or Yarn. Tried with Yarn link generator-jhipster in the folder where i want to create an application.

And again tried yo jhipster command, sill getting the same error.

Until you find the solution, just type the full path to yo instead of "yo". Also, this may helps.

@delverdev Thanks a lot ! Working now :)

Why are you cloning the repo insted of just installing it

On Thu, 6 Apr 2017, 1:08 pm Pascal Grimaud, notifications@github.com
wrote:

Closed #5549 https://github.com/jhipster/generator-jhipster/issues/5549.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/5549#event-1032006681,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF7JCSwIPQksx5fYsy8rFpjU16iNPks5rtMeWgaJpZM4M1ac8
.

@AmsaveniMidhun the instructions you used are obsolete, just follow the official doc.

Install Node.js from http://nodejs.org. I used Node 6.9.1 to write this article.

JHipster requires 6.9.5 currently.

Since JHipster 4 is not released yet, you'll need to clone its GitHub repository to create a project with it.

JHipster 4 has been released at the beginning of February.

Place your node path to user PATH variable this works for me. You can use with yo cmd.

Each and every thing was fine only problem was path so I set path in environment variable.

This path I set in environment variabel

C:\Users\user.npm-packages

where 'user' is my user name, please use your user name.

Then my 'yo', 'bower' command start to executed
Thanks

This is maybe old but it may help someone, in my case I've added "C:\Users{username}\AppData\Local\Yarn\bin" to my user path because I installed Yeoman using Yarn

I tried all, installing ruby, even reinstalling and installing it. But none of them worked.

Try installing yo with yarn yarn add global yo and it worked finally

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pascalgrimaud picture pascalgrimaud  Â·  3Comments

ahmedeldeeb25 picture ahmedeldeeb25  Â·  3Comments

frantzynicolas picture frantzynicolas  Â·  3Comments

Steven-Garcia picture Steven-Garcia  Â·  3Comments

DanielFran picture DanielFran  Â·  3Comments