背景:昨晚 Mac 安装 iTerm2,附带主题、oh my zsh 插件,一切正常。今天运行项目,发现不能用 npmnodenvm 等命令。上网找了很多方案,最终受 stackoverflow 一篇帖子启发。

废话不多说,解决方案如下:

# 打开配置文件
# 找到 plugins 选项,添加命令项并保存
# 我的改动:'plugins=(git)' -> 'plugins=(git node nvm npm)'
open ~/.zshrc

# 启用修改
source ~/.zshrc

# 重启 iTerm

stackoverflow 帖子:https://stackoverflow.com/questions/54698482/zsh-command-not-found-z

希望能帮到你。

That's all.

相关文章:

  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-07
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案