Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to add 'nvm' plugin to zsh through oh my zsh

I have recently just started using wsl and zsh for dev purposes and I have tried to add the nvm through as a plugin in zsh through the ~/.zshrc file. I've added, saved and reloaded the terminal several times and tries the nvm command and it comes out with the 'zsh: command not found: nvm' error.

Any suggestions?

like image 921
Ronen Raduzky Avatar asked Oct 23 '25 17:10

Ronen Raduzky


1 Answers

You can add nvm's loading script to ~/.zshrc. This instruction can be found on the readme.

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

You can test with:

which node

Hope this works :)

like image 166
Max Collier Avatar answered Oct 26 '25 18:10

Max Collier



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!