I just installed Yeoman and some generators. However, because the /usr/lib
folder is protected, I chose to change the prefix of the location where NPM installs its packages.
Right now, everything is getting installed under ~/.node
. I also changed my $PATH
and added ~/.node/bin
. However, when I execute yo <name of generator>
, I get the following:
Error node
You don't seem to have a generator with the name node installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 0 registered generators run yo with the `--help` option.
As you can read here, it's telling me there are 0 registered generators, but I installed them correctly (and it completed without errors). I'm able to find the installed generators, for example ~/.node/lib/node_modules/generator-node
exists and when I execute the following command:
npm list -g
I can find the generators that I installed (so I assume it isn't a problem with npm).
So I think Yeoman (or Yo to be more precisely) is unaware of the generators being installed in the custom folder, but I haven't found any way to configure this.
Looks like a NODE_PATH issue, try to execute the following command:
Or just type
yo doctor
to figure out what's happeningIn addition to adding it to your path, you should also set a
NODE_PATH
environment variable. The yeoman/generator code will look there first: