Node.js
JavaScript outside the browser. The runtime that powers most modern web backends, build tooling, and AI agent CLIs.
Mindmap
The plain-English version
Node.js is a JavaScript runtime built on Chrome's V8 engine, released in 2009. It lets you run JavaScript on a server, on your laptop, in CI — anywhere outside a browser. Node is what made JavaScript a credible backend language; today it powers most modern web stacks, virtually all build tooling (webpack, Vite, esbuild), and most AI coding agent CLIs (including Claude Code).
The problem it solves
Node solved two problems at once: it gave web developers one language across frontend and backend, and it brought JavaScript's package ecosystem (npm) to general-purpose programming. The result is an enormous ecosystem with sharp edges (deep dependency trees, supply-chain risk) and a clear gravity in the modern web.
Alternatives
| Alternative | Type | When it wins |
|---|---|---|
| TypeScript | language | JavaScript with a type system. The language most production codebases use, even ones that look like JavaScript. |
| Python | language | The default language of data, ML, and quick scripts. Increasingly the second language even in JS-first stacks. |
Deep links
The words you'll hear
- npm / pnpm / yarn
- Package managers. npm is the default; pnpm is faster and disk-efficient; yarn is also fine.
package.json- Manifest. Lists dependencies, scripts, metadata.
node_modules- Where dependencies live. Notoriously huge.
npx- Runs a package without installing it globally.
npx prisma migrate. - Event loop
- Node's concurrency model. Single-threaded, non-blocking I/O. CPU-bound work blocks the loop.
- ESM vs CommonJS
- Two module systems.
import(modern) vsrequire(legacy). Mixing them causes pain.
Bad vs. good prompt for Node.js
Why it works: Names the framework, version, validation library, module system, and required endpoints. The agent has no room to silently make the wrong scaffolding choice.
What bites real teams
Mid-tree dependencies that mix systems break in confusing ways. Set "type": "module" early and stick with it.
Heavy CPU work in a single Node process freezes everything. Use worker threads, child processes, or a queue.
npm install some-tiny-thing can pull 200 transitive dependencies. npm ls and npm audit sober you up.