简体   繁体   English

哟:运行yeoman角度发生器时找不到命令

[英]yo: command not found when running yeoman angular generator

I've read every related question on SO and can't get yeoman to work. 我已经阅读了所有关于SO的相关问题,无法让自己工作。 I'm trying to run the yeoman angular generator with yo angular but I continue to get the error: 我试图用yo angular运行yeoman角度生成器,但我继续得到错误:

yo: command not found

I'm sure it has something to do with my .bash_profile, which looks like this: 我确定它与我的.bash_profile有关,看起来像这样:

export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

export GITAWAREPROMPT=~/.bash/git-aware-prompt
source $GITAWAREPROMPT/main.sh
export PS1="\u@\h \w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "

export NODE_PATH="/usr/local/lib/node_modules:/Users/jamesontrinker/npm/lib/node_modules"

I'm pretty ignorant regarding proper paths and all that. 对于正确的路径以及所有这些,我都很无知。 Any ideas? 有任何想法吗?

If you install yo with -g, there should be a static link created in /usr/bin Looks like this: /usr/bin/yo -> /usr/lib/node_modules/yo/cli.js 如果使用-g安装yo,应该在/usr/bin创建一个静态链接,如下所示: /usr/bin/yo -> /usr/lib/node_modules/yo/cli.js

So as long as you have /usr/bin in the $PATH , yo should work. 所以只要你在$PATH/usr/bin ,你应该工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM