Zsh:找不到命令:在新的Mac OS Catalina上执行ng [英] Zsh : command not found : ng on new Mac OS Catalina
问题描述
我已经下载了Catalina的新Mac OS版本Beta.现在,我应该开始使用Zsh.但是,当我想在Atom中运行Angular项目时,我收到以下消息:默认的交互式shell现在是zsh.要更新您的帐户以使用zsh,请运行 chsh -s/bin/zsh
.有关更多详细信息,请访问 https://support.apple.com/kb/HT208050 .我已经在使用zsh Terminal,但他没有找到ng命令.
I have download the new Mac OS Version Beta of Catalina. Now I should start to use Zsh. But when I want to run a Angular project in Atom, I receveid this message : "The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh
.
For more details, please visit https://support.apple.com/kb/HT208050."
I'am already using zsh Terminal but he doesn't found the ng commands.
推荐答案
在Catalina升级后移到zsh之后,我也失去了对命令的访问权限.这为我解决了:源/Users/您的用户名/.bash_profile
I also lost access to my commands after moving over to zsh following the Catalina upgrade. This fixed it for me:
source /Users/YOURUSERNAME/.bash_profile
为了保持这些更改,我使用了oh-my-zsh( https://github.com/robbyrussell/oh-my-zsh ).
In order to get these changes to persist, I used oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh).
使用curl安装: sh -c"$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
然后修改您的.zshrc文件: vi〜/.zshrc
Then modify your .zshrc file:
vi ~/.zshrc
在此行下: source $ ZSH/oh-my-zsh.sh
我只是添加了我在文章开头提到的命令:
I simply added the command I mentioned at the start of the post:
源/Users/您的用户名/.bash_profile
像通常使用vi/vim一样保存文件::wq
Save the file as you normally would with vi/vim: :wq
Oh-my-zsh还具有很多很酷的功能,因此请务必阅读文档.
Oh-my-zsh is also capable of a lot of cool things so be sure to read the documentation.
这篇关于Zsh:找不到命令:在新的Mac OS Catalina上执行ng的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!