0

我有一个奇怪的问题。我想为 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! 
──────────────

问题是我做错了什么,为什么 angular-fullstack 没有出现在我的 yeoman 列表中?

4

1 回答 1

0

我发现我的问题与这个问题几乎重复

你不知道安装的发电机

因为我之前必须npm根据这个问题更改环境变量

答案只是设置另一个像这样的环境变量......

export NODE_PATH=$HOME/.node/lib/node_modules/
于 2014-10-17T04:45:36.017 回答