toolbox · runtime
Node.js
The JavaScript runtime that builds every site in this repo.
Install
winget install --id OpenJS.NodeJS.LTS --source wingetnode --versionnpm --versionWhat it is
Node.js runs JavaScript outside the browser. It is the engine behind our build scripts, the games site tooling and Astro.
How it works
- It pairs the V8 JavaScript engine with an event loop and non-blocking I/O, so one process can handle many small file and network operations.
npmcomes with it.package.jsondeclares a project,package-lock.jsonpins exact versions, andnode_modules/holds what was installed.- Code can be CommonJS (
require) or ESM (import). The root project is CommonJS; the research site is"type": "module".
In this project
shared/build.jsandscripts/*are plain Node with no dependencies.- The games site’s generators and tests run on Node.
sites/researchuses Astro 7, which requires Node 22.23 or newer.
Gotchas
node_modules/is never committed. Runnpm ciwhere apackage-lock.jsonexists.- Cloudflare Pages needs a recent Node. The research project sets
NODE_VERSION=24. - We build with the installed Node, not a bundled one: check
node --versionwhen something behaves differently.