Brew Install Node: Anleitung zur Installation von Node.js mit Homebrew

Dezember 29, 2025

Node.js has become the backbone of modern JavaScript development, powering everything from simple scripts to complex server-side applications. As of January 2026, the latest Long-Term Support (LTS) version is Node.js 24.x (with recent releases like 24.12.0), while the current experimental branch is around 25.x. For beginners, installing Node.js on macOS is straightforward, especially using Selbstgebrautes—the beloved package manager that simplifies software installation.

We’ll cover what Node.js and Homebrew are, step-by-step installation instructions, verification, updates, common issues, and best practices. By the end, you’ll have Node.js and npm (Node Package Manager) ready to build your first projects.

What is Node.js?

Node.js is an open-source, cross-platform JavaScript runtime environment built on Chrome’s V8 engine. It allows you to run JavaScript code outside the browser—perfect for backend development, APIs, command-line tools, and full-stack apps.

Key features:

  • Asynchronous and Event-Driven: Handles many connections efficiently.
  • npm Ecosystem: Comes with npm, the world’s largest software registry with millions of packages.
  • Versatile: Used by companies like Netflix, LinkedIn, and Uber.

Installing Node.js also installs npm automatically.

What is Homebrew?

Homebrew (often called “brew”) is the missing package manager for macOS. It lets you install software via simple terminal commands, managing dependencies and updates effortlessly.

Why use Homebrew for Node.js?

  • No need for sudo privileges (avoids permission issues).
  • Easy updates and uninstalls.
  • Integrates seamlessly with macOS.
  • Preferred over the official .pkg installer for developers.

Homebrew is free, open-source, and community-maintained.

Voraussetzungen

Before starting:

  • A Mac running macOS (Intel or Apple Silicon).
  • Basic familiarity with Terminal (found in Applications > Utilities).
  • Internet connection.
  • Administrative access (for Homebrew installation).

No prior programming knowledge required!

Step 1: Install Homebrew

If you already have Homebrew, skip to Step 2.

1. Open Terminal (search for it in Spotlight with Cmd + Space).

2. Paste the official installation script:

bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

3. This downloads and runs the installer. It may prompt for your password and take a few minutes.

support.apple.com

4. Follow on-screen instructions. On newer macOS (Ventura+), it might add lines to your shell profile (~/.zprofile or ~/.zshrc).

5. Verify installation:

bash
brew --version

You should see something like Homebrew 4.x.x.

6. Update Homebrew:

bash
brew update

Common issue: If you get “command not found: brew”, restart Terminal or run the suggested commands to add Homebrew to your PATH.

Step 2: Install Node.js with Homebrew

Homebrew’s Knoten formula installs the latest stable version (currently Node.js 24.x LTS as of late 2026).

1. In Terminal, run:

bash
brew install node

2. Homebrew downloads Node.js, npm, and dependencies. This can take 5-15 minutes depending on your connection.You’ll see progress bars and output like:

==> Downloading https://ghcr.io/v2/homebrew/core/node...
==> Installing node
==> Pouring node--24.12.0.arm64_ventura.bottle.tar.gz

3. For specific versions (e.g., older LTS like node@20):

bash
brew install node@20

4. But for beginners, stick with the default node for the latest LTS.
cs.swarthmore.edu

Schritt 3: Überprüfen Sie die Installation

Once complete:

1. Check Node.js version:

bash
node --version
# or node -v

Expected: v24.12.0 (or similar recent LTS).

2. Check npm version:

bash
npm --version
# or npm -v

Expected: Something like 10.x.x.

3. Test a simple script:Create a file hello.js:

bash
echo 'console.log("Hello, Node.js!");' > hello.js
node hello.js

Ausgabe: Hello, Node.js!

4. treehouse.github.io

5. radixweb.com

Congratulations! Node.js is installed.

Updating Node.js and npm

Homebrew makes updates easy.

1. Update Homebrew first:

bash
brew update

2. Upgrade Node.js:

bash
brew upgrade node

This fetches the latest version.

3. For npm:

bash
npm install -g npm@latest

4. Check for outdated global packages:

bash
npm outdated -g

Installing Global Packages with npm

npm lets you install tools globally (available everywhere).

Examples for beginners:

  • Create a simple server:
    bash
    npm install -g http-server
  • Modern alternatives like Yarn or pnpm:
    bash
    npm install -g yarn

Always use -g for global installs.

Uninstalling Node.js

If needed:

bash
brew uninstall node

For specific versions:

bash
brew uninstall node@20

Clean up:

bash
brew cleanup

Common Issues and Troubleshooting

  • Command Not Found: node
    • Restart Terminal.
    • Ensure Homebrew’s bin is in PATH: /opt/homebrew/bin (Apple Silicon) or /usr/local/bin (Intel).
    • Run brew doctor for diagnostics.
  • Permission Errors
    • Homebrew avoids sudo—never use it with brew.
  • Apple Silicon (M1/M2/M3) Issues
    • Homebrew installs natively. If issues, ensure Rosetta is not interfering.
  • Conflicts with Previous Installs
    • Uninstall any Node.js from nodejs.org first.
  • Slow Installation
    • Normal for first-time downloads.
  • zsh Warnings
    • Follow Homebrew’s post-install instructions.

Run brew doctor anytime for health checks.

Why Not Use NVM or Other Managers?

For beginners, Homebrew is simplest—one version system-wide.

Advanced users prefer NVM (Node Version Manager) for switching versions per project:

bash
brew install nvm

But start with Homebrew—migrate later if needed.

Best Practices for Beginners

  1. Use LTS Versions: Stable and supported longer (Node.js 24.x is current LTS in 2026).
  2. Project-Specific Packages: Use npm init and package.json.
  3. Learn Basics:
    • npm init -y: Quick project setup.
    • npm install express: Popular web framework.
  4. Sicherheit: Keep updated—Node.js releases security patches regularly.
  5. Explore: Try building a simple Express server or CLI tool.
  6. Ressourcen:
    • Official Docs: nodejs.org
    • Homebrew: brew.sh
    • Free Courses: freeCodeCamp, Node.js tutorials on YouTube.

Abschluss

Installing Node.js with brew install node is one of the easiest ways to enter the JavaScript ecosystem on macOS. In just a few commands, you’ve set up a powerful environment for building servers, tools, and apps.

As you’re now running the latest LTS (24.x), ready for modern development. Start small—run node in REPL mode (interactive shell) and experiment with JavaScript. Bei Carmatec, our expert Node.js developers help enterprises transform these foundations into high-performance, secure, and scalable solutions. Whether you’re building real-time applications, microservices, or cloud-native platforms, you can hire experienced Node.js developers von Carmatec to accelerate development, ensure best practices, and deliver business-ready outcomes.