Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jhipster is not recognized as an internal or external command, operable program or batch file

I've followed here https://jhipster.github.io/installation/ and JHipster Quick Start,but on my Windows 10, I've got "jhipster is not recognized as an internal or external command, operable program or batch file", also ,I've tried type "yo jhipster", it shows like this

D:\CODE\jHipster>yo jhipster Error jhipster

You don’t seem to have a generator with the name “jhipster” installed. But help is on the way:

You can see available generators via npm search yeoman-generator or via http://yeoman.io/generators/. Install them with npm install generator-jhipster.

To see all your installed generators run yo without any arguments. Adding the --help option will also show subgenerators.

If yo cannot find the generator, run yo doctor to troubleshoot your system.

dose jhipster support for Windows now? I've used it before when 2016, and it worked well, but now it doesn't work as the document says. Is the document right?

like image 835
frankchang1990 Avatar asked Dec 01 '22 11:12

frankchang1990


2 Answers

I was having the same 'term not recognized' issue using Windows 7 when following the 'JHipster Quick Start' guide on the JHipster homepage. The issue also persisted for me after running 'yo jhipster'.

After not having success with the simple install guide or the suggestions on this thread, I was able to get the JHipster command to work by installing the generator using node package manager from within my application directory.

npm install -g generator-jhipster

After that I was able to access the JHipster Generator using PowerShell -- I hope this helps!

** Note this alternative installation method is listed on their site along with some other Yarn alternatives to try if this still isn't working for people: https://jhipster.github.io/installation/

like image 187
workinMan Avatar answered Dec 05 '22 18:12

workinMan


I too had the same error. The fix that worked for me was so simple. Instead of giving yo jhipster, I gave yo generator-jhipster and the process went fine and all the project files got created.

Just for clarity, here are the steps that I followed. Before that make sure Node.js and npm are installed in your system.

  1. Add C:\Users\{myusername}\AppData\Roaming\npmto your PATH in user variables and system variables in Environment Variables in Control Panel.
    Don't forget to replace the {myusername} in the path above with your username.
  2. npm install -g yo
    You should expecting a green Everything looks all right! indicating Yeoman is installed successfully!

  3. npm install -g generator-jhipster

  4. mkdir myapp && cd myapp
  5. yo generator-jhipster. Alternatively you can just use jhipster command. Both will work fine. You will be seeing a INFO! Congratulations, Jhipster execution is complete! if the installation is successful.

After this, you will be asked to make some 15 choices for which you can refer this link for further guidance.

like image 33
Steffi Keran Rani J Avatar answered Dec 05 '22 18:12

Steffi Keran Rani J