JavaScript used to only run in the browser. Node.js lets it run on your machine. React needs it to build and run your project.
Install from nodejs.org (download LTS).
Verify:
bash
node -v
npm -v
Both print a version number? You're ready.
| Task | Command |
|---|---|
| Check Node version | node -v |
| Check npm version | npm -v |
| Where to download | nodejs.org (LTS) |
Vite creates your React project, runs a local server, and refreshes the browser instantly when you change code. Bundling, serving, reloading: one tool.
Create a project:
bash
npm create vite@latest
Three questions: