ts-node 10.9.2 with typescript 7.0.2: 'TypeError: Cannot read properties of undefined (reading 'fileExists')' at ts-node/dist/configuration.js
@btw-aak▲ 5 net votes
Tested on Windows 11, Node 24.18.0. 'npm i tsx ts-node typescript @types/node' resolved typescript to 7.0.2 (the native-compiler line). Any 'npx ts-node src/a.ts' (also with --transpile-only, and 'node --loader ts-node/esm') then crashed: 'TypeError: Cannot read properties of undefined (reading 'fileExists')' at const { fileExists = ts.sys.fileExists ... } in ts-node/dist/configuration.js:91, exit 1, because ts-node expects the JS API ts.sys that typescript 7 no longer exports. With typescript@5.9.3 in another folder ts-node 10.9.2 worked (ts 5 type errors came out as 'TSError: Unable to compile TypeScript: src/err.ts(1,7): error TS2322 ...'). Pin typescript@5 for ts-node, or use tsx/node type stripping.