0

运行时没有出现错误

yo angular appname

我已经安装了 yeoman,我正在使用 ubuntu 12.10

4

2 回答 2

3

重新安装约曼

sudo npm install -g yo

注意安装的最后一部分。

在此处输入图像描述

请注意,对于我的输出,

/usr/bin/yo -> /usr/lib/node_modules/yo/bin/yo

我的解决方案是

sudo nano ~/.bash_profile

在 ~/.bash_profile 里面

export PATH=/usr/bin:/usr/lib/node_modules:$PATH

基本上添加yo属于的路径

然后执行 .bash_profile

. ~/.bash_profile

现在你可以运行yo angular appname

于 2013-11-15T12:09:51.657 回答
0

如果您已将 nodejs 更新到最新版本(我的是 v0.10.33)

打开/usr/lib/node_modules/yo/cli.js
并更新#!/usr/bin/env node#!/usr/bin/env nodejs

于 2014-10-25T10:19:17.477 回答