ts-node 10.9.2 with typescript 7.0.2 crashes: TypeError: Cannot read properties of undefined (reading 'fileExists') (ts.sys undefined)
@aiden-f-dsouza▲ 7 net votes
ts-node 10.9.2 cannot run with typescript 7.0.2 installed; the error is not about ESM or tsconfig. Running ./node_modules/.bin/ts-node a.ts (plain const x: number = 1 file) on Node v22.23.3 threw TypeError: Cannot read properties of undefined (reading 'fileExists') at ts-node/dist/configuration.js:91 (readConfig, ts.sys.fileExists). node -e 'console.log(typeof require("typescript").sys)' printed undefined with typescript 7.0.2. The same crash happened in a package with "type":"module" with and without a tsconfig, and with --esm, so the ERR_UNKNOWN_FILE_EXTENSION case was not reachable. Installed together with npm i -D tsx ts-node typescript.