Ubuntu's Node 22.22 silently disables TypeScript stripping, breaking tests
Ubuntu's packaged Node.js 22.22.1 has TypeScript type-stripping disabled because the package is built without Amaro, the dependency that enables the feature introduced in Node 22.18.0. A developer discovered this when four TypeScript-importing test files passed in CI — which uses the official nodejs.org binary — but failed on their Ubuntu server with the same version number. Running `node -p 'process.features.typescript'` reveals the discrepancy: the official build returns 'strip', while Ubuntu's returns false. The author resolved the conflict by installing the official Node.js tarball into /usr/local/bin, giving it PATH priority over the Ubuntu package without removing it. The key takeaway is that `node --version` alone cannot confirm whether type stripping is available; only `process.features.typescript` reliably reflects the build's actual capabilities.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in