bhargav 942
bhargav 942

Reputation: 11

error in custom yeoman generator "You don't seem to have a generator with the name scotchmeans installed."

I created custom yeoman generator following below link.

https://scotch.io/tutorials/create-a-custom-yeoman-generator-in-4-easy-steps

i've done all the required steps when i use npm link in the node command prompt, i got below error

C:\Users\welcome\Desktop\bhargav\generator-scotchmeans>npm link npm ERR! Windows_NT 10.0.10586 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "link" npm ERR! node v5.9.0 npm ERR! npm v3.7.3

npm ERR! Package must have a name field to be linked npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\welcome\Desktop\bhargav\generator-scotchmeans\npm-debug.log

and when i do "yo scotchmeans" i got below error

C:\Users\welcome\Desktop\bhargav\generator-scotchmeans>yo scotchmeans Error scotchmeans

You don't seem to have a generator with the name scotchmeans installed. You can see available generators with npm search yeoman-generator and then install them with npm install [name]. To see the 2 registered generators run yo with the --help option.

can anyone please give suggestion how to resolve

Upvotes: 1

Views: 787

Answers (1)

Munir Husseini
Munir Husseini

Reputation: 489

A little late, maybe, but I encountered this error as well. In my case, the command

npm link

did not do what I thought it would do. Instead, I had to specify the package name explicitly:

npm link generator-mygenerator

Afterwards, I was successfully able to call the generator:

yo mygenerator

Upvotes: 2

Related Questions