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

Viewed 13441

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?

6 Answers

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.

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

Related