[go: up one dir, main page]

DEV Community

daud99
daud99

Posted on

Install NVM/Node on MAC OS

1- Install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Enter fullscreen mode Exit fullscreen mode

2- Installing brew to environment

echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

3- Now, close the terminal and open a new terminal.

4- Installing NVM,

brew install nvm
Enter fullscreen mode Exit fullscreen mode

5- Installing latest node version

nvm install node
Enter fullscreen mode Exit fullscreen mode

6-Installing specific node version say 16.15.0

nvm install 16.15.0
Enter fullscreen mode Exit fullscreen mode

7- Listing all the install node versions

node ls
Enter fullscreen mode Exit fullscreen mode

8- Switching to specific node version

node use 16.15.0
Enter fullscreen mode Exit fullscreen mode

Top comments (0)