把 bash shell 中.bash_profile 全部环境变量加入zsh shell里就好了
1、open .zshrc
将下面环境变量加入到最后面:
source ~/.bash_profile
2、source .bash_profile

3、source .zshrc 更新配置

4、touch .bash_profile 创建.bash_profile

5、mkdir ~/.npm-global(若已有文件则无需创建)
6、npm config set prefix '~/.npm-global'
7、open .bash_profile
将下列语句插入到文件最后保存:
export PATH=~/.npm-global/bin:${PATH}
7、source .bash_profile 更新配置
最后解决了该问题:
评论记录:
回复评论: