Recently, I've been trying to use nvm to manage node version. I successfully installed nvm on Mac OS Catalina(10.15.6) and I can switch between version from the terminal.
However, if I try to do the same thing with the integrated terminal on VSCode, I get
zsh: command not found: nvm
Been looking for solutions or workaround, but there seems to be no relevant answers. Has anyone figure this out?
Thanks in Advance
When I installed VSCode, oh-my-zsh and NVM using homebrew I had the same issue. It appears to put wrong paths in ~/.zshrc (might be the same for bash).
Solution:
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
source ~/.zshrc or source ~/.bashrc in terminal depending on what you use.I also had the same issue after installing nvm and tried to run nvm command in VS Code terminal. This is how I solve it:
Prerequisites:
Steps:
mkdir .nvmsource $(brew --prefix nvm)/nvm.sh
source ~/.zshrcMay this help you!
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