Open the .bash_profile
file and add the following lines of code
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
To use the "zsh" script, you need to add the following code in the .zshrc
file
source ~/.bash_profile
The node installation directory is as follows: /user/.nvm/versions/node/xxxx