Yeoman 角度生成器安装运行,但生成器未出现在生成器列表中 [英] Yeoman angular generator install runs but generator doesn't appear in generator list
问题描述
我尝试使用以下内容安装 yeoman 角度生成器:
I've tried to install the yeoman angular generator with the following:
npm install -g generator-angular
一切看起来都安装正确...
It all looks like it's installed properly...
...
npm http GET https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/event-emitter
npm http GET https://registry.npmjs.org/next-tick
npm http 304 https://registry.npmjs.org/event-emitter
npm http 304 https://registry.npmjs.org/next-tick
generator-angular@0.7.1 /Users/rich/.node/lib/node_modules/generator-angular
├── chalk@0.3.0 (has-color@0.1.4, ansi-styles@0.2.0)
├── wiredep@0.4.2 (chalk@0.1.1, lodash@1.3.1)
└── yeoman-generator@0.13.4 (dargs@0.1.0, diff@1.0.8, debug@0.7.4, rimraf@2.2.6, chalk@0.2.1, text-table@0.1.1, mime@1.2.11, async@0.2.10, mkdirp@0.3.5, isbinaryfile@0.1.9, shelljs@0.1.4, underscore.string@2.3.3, glob@3.2.9, iconv-lite@0.2.11, tar@0.1.19, findup-sync@0.1.3, lodash@1.3.1, request@2.25.0, cheerio@0.12.4, inquirer@0.3.5)
完整日志在这里:https://dl.dropboxusercontent.com/s/hs5dgy1i6f90vu4/angular-generator-log.txt
但每次我这样做:yo angular
我得到:你似乎没有安装名为 angular 的生成器.
But every time I do: yo angular
I get: You don't seem to have a generator with the name angular installed.
yo doctor
说一切正常,我使用 npm 全局安装了 angular.
yo doctor
says everything is ok and I have angular installed globally with npm.
yo --help
显示:
Please choose a generator below.
Mocha
mocha:app
Webapp
webapp:app
我有点困惑,因为安装没有任何错误......?
I'm a bit baffled as there aren't any errors with installation...?
推荐答案
奇怪的是,我通过替换解决了同样的问题
Strangely enough I fixed this very same problem by replacing
npm install -g generator-angular
与
npm install -G generator-angular
注意第二个命令中的大写 G
Note the capital G in the second command
这篇关于Yeoman 角度生成器安装运行,但生成器未出现在生成器列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!