Joao Victor
Joao Victor

Reputation: 1171

Some commands not being found after installing Oh-My-Zsh on mac

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?

Upvotes: 4

Views: 4154

Answers (2)

laurent andre
laurent andre

Reputation: 191

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.

Upvotes: 19

Joao Victor
Joao Victor

Reputation: 1171

I know that it may be not a proper answer to the question, but i solved the problem uninstalling everything and re-installing everything. Now it works as it should.

Upvotes: 0

Related Questions