modules-packagingAnswer last reviewed July 2026

Modern Node, TypeScript codebase. How would you actually run it in production?

A strong answer knows what native type stripping covers and where it stops, and defends build-artifact versus run-TS with startup and observability numbers

What an AI-prepared candidate might say

Modern Node just runs TypeScript files directly. It strips out the type annotations and executes the JavaScript that's left, so for a lot of projects you can literally do node app.ts, no loader, no build step. Type stripping has been on by default since Node 23.6, I believe. It doesn't type-check though, so you still run tsc --noEmit in CI for that part. And the older path still works fine, you compile in CI with tsc or esbuild and deploy plain JavaScript, which keeps production simple and fast. Tools like tsx and ts-node are still around, mostly for older Node versions and for the TypeScript features the built-in stripping doesn't handle. Either way, source maps or preserved positions keep your stack traces pointing at the actual TypeScript lines.

Senior
Locked

Why whitespace-preserving stripping keeps stack traces honest with no source maps at all, which syntax throws ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX, and what the compile cache saves.

Unlock the depth
Staff
Locked

The build-artifact versus run-TS call settled with time-to-listen numbers, the erasable-only lint gate, and where the compile cache should actually live in a container.

Unlock the depth
Follow-up chain
Modern Node, TypeScript codebase. How would you actually run it in production? | NodeBook