How to Install Node.js on macOS

Node.js is one of the most popular back-end development frameworks in the world. It’s fast, efficient, and makes working with JavaScript on the server side incredibly fun. But before you can start building your first project, you’ll need to install Node.js properly on your Mac.

In this guide, we’ll walk you through the step-by-step process to install Node.js on macOS—it’s quick and easy!

Step 1: Download the Latest Version of Node.js

  1. First, visit the official Node.js download page.
  2. You’ll see two versions available:
    • LTS (Long-Term Support): Recommended for most users and offers stability.
    • Current: Includes the latest features but may change more frequently.
  3. Click on the “macOS Installer” button under your preferred version.
  4. Once you click it, the .pkg installer file will begin downloading automatically.

Step 2: Install Node.js on macOS

  1. After the download is complete, open your Downloads folder and double-click on the .pkg file to launch the installer.
  2. In the Introduction window, click Continue to proceed.
  3. Read and accept the license agreement by clicking Agree.
  4. Choose the installation location (the default is fine for most users) and make sure you have at least 102 MB of free disk space.
  5. Click Install to begin the installation process. You may be prompted to enter your Mac password to authorize the installation.
  6. Once the installation is finished, click Close to complete the setup.

Step 3: Verify Node.js and npm Installation

After installation, you’ll want to confirm that Node.js and npm (Node Package Manager) are working correctly.

  1. Press Command (⌘) + Space, type Terminal, and press Enter to open your Mac terminal.
  2. In the terminal, type the following command to check your Node.js version: node --version You should see something like v22.0.0 (version numbers may vary).
  3. Next, check your npm version by typing: npm --version This confirms that npm is installed along with Node.js.

Conclusion

That’s it — you’ve successfully installed Node.js and npm on your Mac! You’re now ready to build your first back-end project, install packages, and start coding in Node.js.

If you’re new to Node.js, consider checking out tutorials on creating your first server or learning npm basics to get started quickly.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.