To set up Node.js for React, install the current LTS release and confirm it works in a terminal. Node is the runtime that runs your build tool and development server, and npm ships with it to install packages.
The current LTS version is Node.js 24. Vite, the build tool used throughout this React track, requires Node 20.19 or newer, so LTS 24 covers every React project in these guides.
Choose a version
Node.js publishes two release lines you will see on the download page. The LTS line is the stable, long-term support release, and the Current line is the newest with features still settling.
For React work, choose LTS. It is the safest version and what most tutorials assume. If a later project needs an older release, nvm can install that exact version side by side.
Install on Windows
Download the LTS installer from the Node.js website and run it. The wizard installs both node and npm and adds them to your PATH.
Accept the default options. When the installer finishes, open a new terminal so the PATH change takes effect.
Install on macOS
The easiest option is the official LTS installer from the Node.js website. Download the package, open it, and follow the prompts.
If you use Homebrew, you can install with:
brew install node@24Homebrew also prints a note about adding the version to your PATH. Follow that instruction before moving on.
Install on Linux
Use your distribution's package manager. On Debian and Ubuntu based systems, the recommended approach is NodeSource's setup script or nvm, because the default repositories often lag behind LTS.
The most flexible option on any Linux system is nvm:
nvm install --ltsThis installs the current LTS release and switches your shell to it.
Verify the install
Open a terminal and check both tools:
node --version
npm --versionThe first command prints a version like v24.19.0, and the second prints the npm version. If either command is not found, restart your terminal or reinstall Node.
Download the LTS installer
Get the LTS build for your operating system from the Node.js website.
Run the installer
Complete the wizard on Windows or macOS, or run your package manager on Linux.
Open a new terminal
Restart the terminal so the PATH change is picked up.
Verify node and npm
Run node --version and npm --version and confirm both print numbers.
What to learn next
With Node installed, create a React app with Vite to put it to work. You can also follow the guide on running an existing React project from GitHub to test the setup on real code.
Rune AI
Key Insights
- Install the current LTS version of Node.js, which is 24 at the time of writing.
- Use the official installer on Windows and macOS.
- Use your package manager or nvm on Linux.
- Verify with node --version and npm --version.
- nvm lets you install and switch Node versions per project.
Frequently Asked Questions
Which Node.js version should I install for React?
How do I check my Node.js version?
What is nvm and do I need it?
Conclusion
Setting up Node.js means installing the current LTS version and confirming node and npm work in a terminal. The official installer is the simplest path, and nvm is a useful addition when you need to switch versions between projects.
More in this topic
How to Build a Dropdown Menu in React
Build a React dropdown menu with the ARIA menu button pattern. Handle open and close, keyboard arrows, and clicks outside the menu.
How to Animate React Components with Motion
Animate React components with the Motion library. Set up motion, add enter, hover, and exit animations, and respect reduced motion.
Headless UI Components Explained: Logic Without Locked Styling
Understand headless UI components and how libraries like Radix give you unstyled, accessible behavior that you style yourself.