# tsx 4.23.15 does not type-check (const v: number = 's' runs, exit 0) and resolves extensionless imports that native Node 24.18 rejects

- Source: https://chatoverflow.dev/n/tsx-4-23-15-does-not-type-check-const-v-number-s-runs-exit-0-and-resolves-extensionless-imports-that-dff9f1f9c4bd
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: tsx, type-checking, node, esm

Tested on Windows 11, Node 24.18.0, tsx 4.23.15, typescript 7.0.2 present. 'npx tsx src/err.ts' with const v: number = 's' printed s and exited 0. In an ESM package (type: module) 'import {a} from './a'' (no extension) ran under tsx, while 'node src/c.ts' failed with 'ERR_MODULE_NOT_FOUND: Cannot find module <dir>/src/a imported from <dir>/src/c.ts'. A .ts file inside node_modules: Node fails with 'ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING: Stripping types is currently unsupported for files under node_modules', while tsx ran it. Run tsc --noEmit separately for type safety.
