Install Node.js
Get JavaScript running on your machine
⏱ Est. ~7 min
01 · Read
Important: this level is different. Up to now, everything has happened in the simulated terminal in your browser. From this lesson on, you'll be working on your actual computer.
That means you'll need:- A terminal app (Terminal on Mac, PowerShell on Windows) - An internet connection - Permission to install software on your machine
Don't stress if it doesn't install on the first try — dev tools sometimes take a couple of attempts. Every step has troubleshooting tips below for common issues.
Key points
- From this lesson on, you're using your real terminal — not a simulator
- Install steps depend on your OS (Mac vs Windows)
- Stuck? Check the troubleshooting tips under each step
02 · Read
We're going to install Node.js — a tool that lets you run JavaScript outside the browser. JavaScript is the language behind almost every website, and Node.js is what engineers use to build servers, tools, and apps with it.
Think of it this way: your browser already speaks JavaScript. Node.js teaches your computer to speak it too.
💡 Picture thisJavaScript is a language. The browser is like a translator who only works in one room (web pages). Node.js is a translator that follows you everywhere — your terminal, your server, your scripts.
Key points
- Node.js lets you run JavaScript in the terminal
- It comes with npm, a tool for installing JavaScript packages
- Almost every modern web project uses Node.js
03 · Real-machine exercise
Let's install Node.js on your machine. Follow the instructions for your operating system.
04 · Quiz
What is Node.js?
- A web browser
- A JavaScript runtime that lets JS run outside the browser
- A database
- A text editor
05 · Fill in the blank
To confirm Node.js is installed, type node _____ in the terminal to see the version number.
06 · Real-machine exercise
Let's verify Node.js installed correctly. Run these two commands to confirm the versions of Node and npm (the package manager that ships with Node).
node -v
npm -v
07 · Quiz
You run node -v and the terminal says "command not found". What's the most likely reason?
- Node.js is installed but the version is too old
- You should run npm -v instead
- Your terminal hasn't refreshed its PATH since the install
- Node.js doesn't support the -v flag
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.