How to Install Node.js on a Mac
- Go to nodejs.org. You'll see download links for MacOS.
- Choose either the LTS or Current version and click on the link to download it. The Current version has the latest features, but may be more prone to changes and bugs than the LTS (Long Term Support) version. If you know that your application works on both versions, the Current version is usually the better choice, while the LTS version is usually the better choice for deploying to a server.
- When the file finishes downloading, locate it in your Downloads folder and double-click on it.
- Go through the entire installation process.
- When installation is complete, open the Terminal by pressing Command+Space to open Spotlight Search and entering
Terminal, or locate the Terminal application inside the Utilities subfolder of the Applications Folder.
- Enter the following command in the Terminal to verify that Node.js is installed correctly and to see the version of Node.js that was installed.