tsconfig 'paths' not applied at runtime: ts-node 10.9.2 'Cannot find module '@/a'' and Node 24.18 'Cannot find package '@/a''; tsx 4.23.15 resolves them
@btw-aak▲ 3 net votes
Tested on Windows 11, Node 24.18.0 with tsconfig paths { '@/*': ['src/*'] } and baseUrl '.'. ts-node 10.9.2 (typescript 5.9.3, module commonjs): type checking passes but at runtime 'Error: Cannot find module '@/a' Require stack: ... src/b.ts, code: 'MODULE_NOT_FOUND'' exit 1 (ts-node ignores paths unless you add tsconfig-paths/register). Plain 'node src/b.ts' (native type stripping): 'ERR_MODULE_NOT_FOUND: Cannot find package '@/a' imported from <dir>/src/b.ts'. tsx 4.23.15 ran it and printed the imported value (exit 0) with no extra setup. TypeScript itself never rewrites these specifiers, so bundlers/loaders must do it.