generator-angular - 您似乎没有安装名称为 angular 的生成器

generator-angular - You don't seem to have generator with the name angular installed

所以我想看看最新的生成器,因为他们现在使用 gulp。

无论如何,在更新所有内容两次、重新安装节点、删除 npm-cache 等之后,当我执行 yo angular 时,会发生以下情况:

然后它崩溃了(显然是在 运行 npm install / bower install 之前),消息不是很有帮助

Error angular

You don't seem to have a generator with the name angular:common:C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-angular\app\index.js installed.

目录在那里(生成器-angular)。子目录在那里 (generator-angular/common)。 index.js 存在。我已经安装并更新了生成器和所有依赖项 5 次了。

现在,奇怪的是,我尝试了旧版本的 yo 和 generator-angular,但它们都失败并显示相同的错误消息,所以这很可能是我的问题,但我不能'想不通。

我在 Whosebug 上发现了这个问题的旧线程,但所有线程都通过更新或修复路径解决了。 None 其中帮助了我 :(

这是哟医生输出

Yeoman Doctor
Running sanity checks on your system

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

Everything looks all right!

我也在 Win10x64 上。有任何想法吗?

由@SBoudrias 在 0.15.1 版本中修复。你能试试 npm uninstall -g yo && npm install -g yo 吗?