When I try to run my codes like “ts-node index.ts” on visual code studio, it is showing that error messages

/usr/local/lib/node_modules/ts-node/src/index.ts:857
const diagnosticText = formatDiagnostics(diagnostics, diagnosticHost);
^
TypeError: formatDiagnostics is not a function
at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:857:28)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:863:19)
at createFromPreloadedConfig (/usr/local/lib/node_modules/ts-node/src/index.ts:874:36)
at phase4 (/usr/local/lib/node_modules/ts-node/src/bin.ts:543:44)
at bootstrap (/usr/local/lib/node_modules/ts-node/src/bin.ts:95:10)
at main (/usr/local/lib/node_modules/ts-node/src/bin.ts:55:10)
at Object. (/usr/local/lib/node_modules/ts-node/src/bin.ts:800:3)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)

And I don’t know how to fix it. Please, help me!!!
My node version is 18.18, typescript version is 5.3.3, ts-node is 10.9.2

Or the issue depends on the versions of languages?