TypeStrong / ts-node

TypeScript execution and REPL for node.js
https://typestrong.org/ts-node
MIT License
12.75k stars 529 forks source link

Error when using ts-node with tsonfig/bases and typescript 5.3.2 #2088

Closed edosrecki closed 8 months ago

edosrecki commented 8 months ago

After upgrading typescript from 5.2.2 to 5.3.2, I started getting error when using ts-node with tsconfig/bases. See below.

Expected Behavior

Prints typescript config to standard output.

Actual Behavior

Error:

TSError: ⨯ Unable to compile TypeScript:
error TS6053: File '@tsconfig/node20/tsconfig.json' not found.

Steps to reproduce the problem

npx ts-node --showConfig

Minimal reproduction

https://github.com/TypeStrong/ts-node-repros/pull/36

Workaround

Use relative path to tsconfig/bases file:

- "extends": "@tsconfig/node20/tsconfig.json",
+ "extends": "./node_modules/@tsconfig/node20/tsconfig.json",

Specifications

edosrecki commented 8 months ago

Closing in favor of existing issue: https://github.com/TypeStrong/ts-node/issues/2076

bennycode commented 7 months ago

I am also getting error TS6053: File '@tstv/tsconfig-common/tsconfig.json' not found when using TypeScript 5.3.2 with ts-node 10.9.1.

Switching from "extends": "@tstv/tsconfig-common/tsconfig.json" to "extends": "./node_modules/@tstv/tsconfig-common/tsconfig.json" in my tsconfig.json quick-fixed it. Thanks for this workaround. 👍

edosrecki commented 7 months ago

@bennycode you should upgrade to ts-node 10.9.2 where this was fixed