Before installing the Oh-My-Zsh terminal, i had installed node, npm and brew. But after installing Oh-My-Zsh, i get these errors:
➜ ~ node
zsh: command not found: node
➜ ~ npm
zsh: command not found: npm
➜ ~ brew
zsh: command not found: brew
➜ ~
I searched about it for a while and found that using:
source ~/.bash_profile;
at the end of the .zshrc file doesn't work, since i don't have a bash_profile file. And uncommenting the following line at the beginning:
export PATH=$HOME/bin:/usr/local/bin:$PATH
of the .zshrc file doesn't work either. How can fix this?
if you look in the .zshrc.pre-oh-my-zsh , you find some export for NVM_DIR.
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
i solved my pb by adding
source $HOME/.zshrc.pre-oh-my-zsh
at the end of the .zshrc and now nvm ( and node -v / ng etc .. ) are working again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With