'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?



Solution 1:[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:[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:[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:[4]

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

Solution 5:[5]

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 6:[6]

In case you are using Windows10 or later (Linux over Windows):

the solution for me was to re install node-js.

Then execute the command again npm install -g generator-jhipster

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 workinMan
Solution 2
Solution 3 Julien Dubois
Solution 4 Shane
Solution 5 Ramesh Karna
Solution 6 Abdulraqeeb M.