Found during dogfooding v3.9.4
Severity: High
Command: npm run build:wasm, npm run deps:tree, npm run version
scripts/node-ts.js selects between --strip-types and --experimental-strip-types based on the Node major version:
// scripts/node-ts.js:9
const flag = major >= 23 ? "--strip-types" : "--experimental-strip-types";
On Node 24 (currently 24.10.0), --strip-types is not a recognized flag. The only accepted flag is still --experimental-strip-types (TypeScript stripping is unflagged by default, and the --no-experimental-strip-types flag exists to disable it). Any npm script that routes through node-ts.js fails immediately with:
node: bad option: --strip-types
Reproduction
node --version # v24.10.0
npm run build:wasm # fails with "bad option: --strip-types"
or directly:
node --strip-types -e "const x: number = 1; console.log(x);"
# node: bad option: --strip-types
node --experimental-strip-types -e "const x: number = 1; console.log(x);"
# 1
Expected behavior
Scripts like build:wasm, deps:tree, version should run on any supported Node version (>= 22.6 per engines.node).
Actual behavior
They error out immediately on Node 24.x.
Suggested fix
Use --experimental-strip-types on every supported Node version. It works on 22.x, was accepted on 23.x, and still works on 24.x. Delete the version gate entirely:
const flag = "--experimental-strip-types";
Alternatively, on Node 24 TypeScript stripping is default-on, so the flag can be omitted entirely on 24+. But the simplest change is to just use --experimental-strip-types everywhere.
Workaround
npm run benchmark works because package.json hardcodes --experimental-strip-types directly, bypassing node-ts.js.
Found during dogfooding v3.9.4
Severity: High
Command:
npm run build:wasm,npm run deps:tree,npm run versionscripts/node-ts.jsselects between--strip-typesand--experimental-strip-typesbased on the Node major version:On Node 24 (currently 24.10.0),
--strip-typesis not a recognized flag. The only accepted flag is still--experimental-strip-types(TypeScript stripping is unflagged by default, and the--no-experimental-strip-typesflag exists to disable it). Any npm script that routes throughnode-ts.jsfails immediately with:Reproduction
or directly:
Expected behavior
Scripts like
build:wasm,deps:tree,versionshould run on any supported Node version (>= 22.6 perengines.node).Actual behavior
They error out immediately on Node 24.x.
Suggested fix
Use
--experimental-strip-typeson every supported Node version. It works on 22.x, was accepted on 23.x, and still works on 24.x. Delete the version gate entirely:Alternatively, on Node 24 TypeScript stripping is default-on, so the flag can be omitted entirely on 24+. But the simplest change is to just use
--experimental-strip-typeseverywhere.Workaround
npm run benchmarkworks becausepackage.jsonhardcodes--experimental-strip-typesdirectly, bypassingnode-ts.js.