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

11,875

Solution 1

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/

Solution 2

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.

Solution 3

We had an issue yesterday with JHipster v4.5.0, it should be solved today with v4.5.1. Can you try it out?

Don't hesitate to give feedback on https://github.com/jhipster/generator-jhipster/issues/5797 - we don't have any Windows machine, so it's very hard for us to test.

Solution 4

I know it's way too late to respond to this question, but it could be helpful for future readers :).

It happens when your Environment PATH variable doesn't contain npm's global installation directory path. By default, it's set during Node installation. Not sure why but it gets dropped from time to time on Windows (I believe during window updates), which leads your command prompt not recognizing npm's global apps.

This can be resolved either you add below path to your environment variable.

C:\Users\userName\AppData\Roaming\npm. where userName is your system login user name.

Or

Reinstall Node which will automatically add this path for you.

I would prefer 1st approach as that seems easy and quick one.

Solution 5

FYI I'm also having with the quickstart instructions on windows 10 (Home, 64bit) with version 4.5.1

Here is the output from following the instructions

PS C:\Users\user> yarn global add generator-jhipster

yarn global v0.24.6

[1/4] Resolving packages...

warning generator-jhipster > yo > fullname > [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm

[2/4] Fetching packages...

[3/4] Linking dependencies...

[4/4] Building fresh packages...

success Installed "[email protected]" with binaries: - jhipster Done in 33.73s.

Then I get the following when I try to run it

PS C:\Users\user> jhipster

jhipster : The term 'jhipster' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

  • jhipster

  • ~~~~~~~~

  • CategoryInfo : ObjectNotFound: (jhipster:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Share:
11,875
Admin
Author by

Admin

Updated on June 16, 2022

Comments

  • Admin
    Admin almost 2 years

    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?

  • Pras
    Pras over 6 years
    still not working with yarn global add generator-jhipster ... but works fine with npm install -g generator-jhipster (Windows 10)
  • Gaël Marziou
    Gaël Marziou about 6 years
    It's a not safe to run as admin using files downloaded from the internet, you should not need it if you had installed nodejs under non default location (i.e don't install in c:\pogram files) Also your issue could be due to bad path for node binaries like jhipster, check whether folder returned by npm bin -g is included in your PATH env variable.
  • Steffi Keran Rani J
    Steffi Keran Rani J about 6 years
    These commands required administrative privileges. That is why I suggested so. @GaëlMarziou.
  • Gaël Marziou
    Gaël Marziou about 6 years
    My point is that they should not require admin privileges once you took the time to install nodejs correctly.
  • Steffi Keran Rani J
    Steffi Keran Rani J about 6 years
    @GaëlMarziou Oh maybe.. thanks for your valuable inputs. I have edited my answer
  • 62mkv
    62mkv almost 6 years
    for this to work, your "yarn global folder" has to be on PATH . you can see the folder path by running "yarn bin -g" command