2021-10-25发表Web几秒读完 (大约71个字)source ~/.bash_profile问题每次打开终端都要先执行 $source ~/.bash_profile 后才能正常使用npm。 解决方法打开终端后编辑文件.zshrc。 1vi ~/.zshrc 按i进入编辑模式添加: 1source ~/.bash_profile 按Esc后输入:wq回车保存退出。 source ~/.bash_profilehttps://www.kiro.cc/2021/10/bash-profile/作者Kiro发布于2021-10-25更新于2021-12-01许可协议#Mac