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

时间:2018-03-20 05:36:25

标签: npm yeoman yeoman-generator azure-artifacts

我将我的generator-app发布到我们团队的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可以工作,我使用自耕农的发电机 - 发电机生成generator-app。这是我的源代码:

enter image description here

1 个答案:

答案 0 :(得分:0)

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