Starting your JavaScript journey requires setting up your development environment. One of the essential tools is Node.js. In this tutorial, we’ll install Node.js on MacOS using Node Version Manager (NVM), which offers more flexibility and ease in managing multiple Node.js versions.
$ nvm use 16 Now using node v16.9.1 (npm v7.21.1) $ node -v v16.9.1 $ nvm use 14 Now using node v14.18.0 (npm v6.14.15) $ node -v v14.18.0 $ nvm install 12 Now using node v12.22.6 (npm v6.14.5) $ node -v v12.22.6
Step 1: Install Homebrew
Homebrew is a free and open-source software package management system that simplifies the installation of software on MacOS. Open your terminal and run the following command: