nvm
NVM Install
Now, you system is ready for the installation. Update the Homebrew package list and install NVM.
brew update brew install nvm
Next, create a directory for NVM in home.
mkdir ~/.nvm
Now, configure the required environment variables. Edit the following configuration file in your home directory
vim ~/.bash_profile
and, add below lines to ~/.bash_profile ( or ~/.zshrc for macOS Catalina or later)
export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh
Press ESC + :wq to save and close your file.
Next, load the variable to the current shell environment. From the next login, it will automatically loaded.
source ~/.bash_profile
That’s it. The NVM has been installed on your macOS system. Go to next step to install Node.js versions with the help of nvm.
First of all, see what Node versions are available to install. To see available versions, type:
nvm ls-remote
Install node for M1 arch:
nvm uninstall 14 arch -x86_64 zsh nvm install 14 nvm alias default 14
nvm.txt · Last modified: 2023/09/14 06:06 by 127.0.0.1