当生成器包来自 VSTS 注册表时如何 运行 yo generator 命令

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

我将我的生成器应用程序发布到我们团队的 VSTS npm 注册表,我可以使用命令将它安装到我的本地机器:npm install -g geneartor-app,但是当我 运行 yo 命令:yo app,它显示以下错误:

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.

有谁知道为什么 yeoman 找不到 generator-app 包。 顺便说一句,npm link 可以工作,我使用 yeoman 的生成器生成了 generator-app。这是我的源代码:

是我自己的问题,删除generators文件夹后忘记修改package.json中的files选项