nvm manages multiple node versions

created at 11-15-2021 views: 1

step 1

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

step 2

To use the "zsh" script, you need to add the following code in the .zshrc file

source ~/.bash_profile

step 3

The node installation directory is as follows: /user/.nvm/versions/node/xxxx


created at:11-15-2021
edited at: 11-15-2021: