I ran sudo npm install -g generator-flask
and it was saved. I was able to confirm by running npm list-g
.
I then run yo flask
. Thinking that this was going to work, I instead get an error message:
Error flask You don't seem to have a generator with the name flask installed. You can see available generators with npm search yeoman-generator and then install them with npm install [name]. To see the 22 registered generators run yo with the `--help` option.
I do as it tells me by running yo --help
and discover that the flask generator is not there.
I try this with sudo npm install -g generator-angular-flask
and the problem is recreated with Angular Flask. I'm assuming this is going to happen for all the generators which is why I've titled it as Yeoman not recognizing new npm installs.
Does anyone know why this has happened?
I was having a similar issue. Basically Yeoman was showing No installed generators, even if I fired up yeoman and installed the generator again still no luck to run it.
I typed
yo doctor
and did the changes it recommends, but still no luck...I then ran
Then I fired up Yeoman and still no luck.
I then decide run
yo doctor
again and voila! New errors. I then saw the final recommendation by the yo doctor so I decide to run it:After I type
yo
and guess what I see? All my installed yeoman generators showing and working marvelously.Usually it is a $NODE_PATH issue, but rather then guessing, run:
and follow the instructions!
Node path is the issue. To setup path:
In my case node is in HOME directory.
You can use:
and you will not something like:
and try again:
A workaround, but does solve the problem:
(as does just installing the module locally)
Check if you have
NODE_PATH
set. To set it open a terminal and type (assuming you have node under/opt/node/
and usebash
shell)Once done, run
yo doctor
. If all is ok, runyo
to see your installed generators.