yo icon indicating copy to clipboard operation
yo copied to clipboard

yo --generators lists my custom generator (globally installed) but yo says it's not installed

Open EdwardDrapkin opened this issue 7 years ago β€’ 2 comments

Hi there, I have a custom generator I wrote (@flexshopper/generator-flexshopper) and it's installed globally.

yo --generators sees it:

 πŸ“’32 🍺 yo --generators
Available Generators:

  @flexshopper/flexshopper
    babel
    fleathers
    node

However, yo @flexshopper/flexshopper raises an error:

 πŸ“’33 🍺 yo @flexshopper/flexshopper
Error @flexshopper/flexshopper

You don't seem to have a generator with the name β€œ@flexshopper/flexshopper” installed.
But help is on the way:

yo doctor gives the all clear:

 πŸ“’34 🍺 yo doctor

Yeoman Doctor
Running sanity checks on your system

βœ” Global configuration file is valid
βœ” NODE_PATH matches the npm root
βœ” Node.js version
βœ” No .bowerrc file in home directory
βœ” No .yo-rc.json file in home directory
βœ” npm version

Everything looks all right!

I installed a newer version of node with nvs and I don't think I changed any settings that should carry from one version of Node to another.

EdwardDrapkin avatar Jan 17 '18 15:01 EdwardDrapkin

Any chance your generator JS files are broken? When we search for generators, we don't actually require the JS files; but we do when trying to run one.

SBoudrias avatar Jan 18 '18 05:01 SBoudrias

Hi there, I have a custom generator I wrote (@flexshopper/generator-flexshopper) and it's installed globally.

yo --generators sees it:

 πŸ“’32 🍺 yo --generators
Available Generators:

  @flexshopper/flexshopper
    babel
    fleathers
    node

However, yo @flexshopper/flexshopper raises an error:

 πŸ“’33 🍺 yo @flexshopper/flexshopper
Error @flexshopper/flexshopper

You don't seem to have a generator with the name β€œ@flexshopper/flexshopper” installed.
But help is on the way:

yo doctor gives the all clear:

 πŸ“’34 🍺 yo doctor

Yeoman Doctor
Running sanity checks on your system

βœ” Global configuration file is valid
βœ” NODE_PATH matches the npm root
βœ” Node.js version
βœ” No .bowerrc file in home directory
βœ” No .yo-rc.json file in home directory
βœ” npm version

Everything looks all right!

I installed a newer version of node with nvs and I don't think I changed any settings that should carry from one version of Node to another.

image

me too ... Is there any solution? thanks

arleyGuoLei avatar Dec 30 '22 06:12 arleyGuoLei