运行时没有出现错误
yo angular appname
我已经安装了 yeoman,我正在使用 ubuntu 12.10
重新安装约曼
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
如果您已将 nodejs 更新到最新版本(我的是 v0.10.33)
打开/usr/lib/node_modules/yo/cli.js
并更新#!/usr/bin/env node
到#!/usr/bin/env nodejs