我有一个奇怪的问题。我想为Yeoman安装angular-fullstack生成器......
npm install -g generator-angular-fullstack
这会返回......
yo@1.3.2 postinstall /home/lmacvean/.node/lib/node_modules/generator-angular- fullstack/node_modules/yo
yodoctor
[Yeoman Doctor] Everything looks all right!
generator-angular-fullstack@2.0.13
/home/lmacvean/.node/lib/node_modules/generator-angular-fullstack ├──
chalk@0.4.0 (has-color@0.1.7, ansi-styles@1.0.0, strip-ansi@0.1.1) ├──
wiredep@0.4.2 (lodash@1.3.1, chalk@0.1.1) ├── yeoman-generator@0.17.7
(dargs@2.0.3, diff@1.0.8, class-extend@0.1.1, rimraf@2.2.8,
text-table@0.2.0, mime@1.2.11, async@0.9.0, isbinaryfile@2.0.1,
github-username@1.0.0, shelljs@0.3.0, cross-spawn@0.2.3,
grouped-queue@0.3.0, nopt@3.0.1, mkdirp@0.5.0, iconv-lite@0.4.4,
debug@1.0.4, underscore.string@2.3.3, lodash@2.4.1, chalk@0.5.1,
run-async@0.1.0, findup-sync@0.1.3, file-utils@0.2.1, glob@4.0.6,
request@2.45.0, cheerio@0.17.0, gruntfile-editor@0.2.0,
inquirer@0.7.3, download@1.0.7) ├── yo@1.3.2 (is-root@1.0.0,
sudo-block@1.0.0, fullname@1.0.0, yeoman-doctor@1.0.0, opn@1.0.0,
yeoman-character@1.0.0, async@0.9.0, nopt@3.0.1, shelljs@0.3.0,
underscore.string@2.3.3, lodash@2.4.1, string-length@1.0.0,
findup@0.1.5, yosay@1.0.0, chalk@0.5.1, multiline@1.0.1,
update-notifier@0.2.2, configstore@0.3.1, yeoman-environment@1.0.2,
insight@0.4.3) └── generator-ng-component@0.0.10
然后yo
返回......
? 'Allo! What would you like to do?
Run a generator
Webapp
Mocha
──────────────
Update your generators
Install a generator
Find some help
Get me out of here!
──────────────
问题是我做错了什么,为什么角度全堆栈没有出现在我的自耕单列表中?
答案 0 :(得分:0)
我发现我的问题几乎是这个问题的重复
Yo unaware of installed generators
因为我必须先根据this issue
更改npm
的环境变量
答案就是设置另一个像这样的环境变量......
export NODE_PATH=$HOME/.node/lib/node_modules/