Here are the steps to install Node.js on a Mac:
1. Visit the Node.js official website:
Open the [Node.js official website].
2. Choose a version:
The website will display the latest stable version and the long-term support (LTS) version such as below picture. Depending on your needs, select a version. In general, choosing the LTS version is a good option.
3. Run the Node.js installer:
Once the download is complete, run the downloaded installer.
4. Verify the installation:
After installation, you can verify if Node.js and npm were installed successfully by typing the following commands in the Terminal:
node -v
npm -v
If everything is set up correctly, these commands will display the installed versions of Node.js and npm like below picture.
Now, you have successfully installed Node.js. If you need to globally install Node.js modules later on, you can use the npm command.
I hope this helps! Feel free to ask if you have any further questions.
Top comments (0)