The interactive guide to setting up Node.js. Pick your OS, choose your tools, and get running in minutes.

~/projects
scroll

Build anything with JavaScript

Node.js lets you run JavaScript everywhere — servers, CLIs, APIs, real-time apps, and more. Here's what makes it powerful.

Non-blocking I/O

Event-driven architecture handles thousands of concurrent connections with a single thread, making it ideal for real-time applications.

📦

Massive Ecosystem

Over 2 million packages on npm — the world's largest software registry. Whatever you need, someone's already built it.

🔄

Full-Stack JS

Same language on frontend and backend. Share code, types, and validation logic across your entire stack seamlessly.

🚀

Performance

Built on Chrome's V8 engine, Node compiles JavaScript directly to machine code for blazing fast execution speeds.

Set up Node.js

Follow the steps for your operating system. We recommend using a version manager for flexibility.

Select your operating system:

macOS — Using nvm (recommended)

# Install nvm (Node Version Manager)
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# Restart terminal, then install Node
$ nvm install --lts
$ nvm use --lts

Or install via Homebrew: brew install node

Choose a Version Manager

Version managers let you switch between Node versions per project. Here's how they compare:

ManagerSpeedCross-platformBest For
nvmModeratemacOS / LinuxMost popular, huge community
fnmFastAll platformsSpeed-focused, Rust-based
VoltaFastAll platformsTeams & monorepos
asdfModeratemacOS / LinuxMulti-language projects
nvm-windowsModerateWindows onlyWindows-native nvm alternative

Verify Your Installation

Run these commands to confirm everything is working:

$ node --version
v22.14.0

$ npm --version
10.9.2

$ node -e "console.log('Hello from Node!')"
Hello from Node!

If you see version numbers, you're all set! If not, try restarting your terminal.

Create Your First Project

# Create a new directory
$ mkdir my-app && cd my-app

# Initialize package.json
$ npm init -y

# Create your first file
$ echo 'console.log("It works!")' > index.js

# Run it!
$ node index.js
It works!

Congratulations — you're a Node.js developer now. Next, explore frameworks like Express, Fastify, or Hono.

npm vs yarn vs pnpm vs bun

Every Node project needs a package manager. Here's an interactive comparison to help you choose.

📦

npm

Ships with Node. Zero setup needed. The default choice for most projects.

Default
🧶

Yarn

Plug'n'Play mode, workspaces, and offline caching. Great for monorepos.

Monorepos

pnpm

Content-addressable storage saves disk space. Strictest dependency resolution.

Fastest
🔥

Bun

All-in-one runtime + bundler + package manager. Blazingly fast installs.

Newest

Environment Checker

Simulate a readiness check to see what a healthy Node.js setup looks like.

Node.js Runtime

Checking for Node.js installation…

npm Package Manager

Checking npm availability…

Git Version Control

Checking for Git…

package.json

Looking for project configuration…

node_modules

Checking dependency installation…

Node.js Versions

Key releases and what they brought to the platform.

v22 LTS
Active LTS — October 2024
WebSocket client, require(esm), glob/globSync built-in, improved watch mode, and V8 12.4 with modern JavaScript features.
v20 LTS
Maintenance — October 2023
Stable test runner, permission model, single-executable apps, V8 11.3, and import.meta.resolve.
v18 LTS
End of Life — April 2022
Built-in fetch API, Web Streams, test runner module, Blob and BroadcastChannel support.
v16 LTS
End of Life — April 2021
Apple M1 support, Timers Promises API, stable AbortController, and V8 9.4.

Common Questions

Quick answers to questions every Node.js beginner asks.

Choose LTS (Long Term Support) for production apps and stability. Current is for experimenting with the latest features. Most developers should stick with LTS.
Not strictly, but strongly recommended. Different projects often need different Node versions. A version manager like nvm or fnm lets you switch instantly and avoids permission issues with global installs.
Node.js is the runtime that executes JavaScript. npm is the package manager for installing libraries. npx is a tool (included with npm) that runs packages without installing them globally — great for one-off commands like "npx create-react-app".
Bun aims to be a drop-in replacement with faster performance, but it's still maturing. Node.js has a much larger ecosystem and battle-tested stability. Many teams use Bun for development speed while deploying on Node for reliability.
With nvm: run "nvm install --lts" then "nvm alias default lts/*". With fnm: "fnm install --lts". Without a version manager, download the new installer from nodejs.org or use your OS package manager.