Search code examples
npmyeomanyeoman-generatorazure-artifacts

How to run yo generator command when the generator package is from VSTS registry


I published my generator-app to our team's VSTS npm registry, and i can install it into my local machine by using command: npm install -g geneartor-app, however when i run the yo command: yo app, it show bellow error:

E:\workspace
λ yo app
Error app

You don't seem to have a generator with the name “app” 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-app.

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.

Does anyone know why yeoman cannot find the generator-app package. BTW, npm link can work and i generated the generator-app by using yeoman's generator-generator. Here's my source code:

enter image description here


Solution

  • It's my own problem that i forgot to modify the files option in package.json after removing the generators folder.