Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
edosrecki opened this issue Nov 21, 2023 · 3 comments
Closed

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

edosrecki opened this issue Nov 21, 2023 · 3 comments

Comments

@edosrecki
Copy link
Contributor

edosrecki commented Nov 21, 2023

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

TypeStrong/ts-node-repros#36

Workaround

Use relative path to tsconfig/bases file:

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

Specifications

  • ts-node version: 10.9.1
  • node version: 20.9.0
  • TypeScript version: 5.3.2
  • tsconfig.json, if you're using one:
{
  "extends": "@tsconfig/node20/tsconfig.json",
  "compilerOptions": {
    "rootDir": ".",
    "outDir": "./dist"
  }
}
  • package.json:
{
  "name": "ts-node-bug",
  "version": "0.0.0-dev",
  "devDependencies": {
    "@tsconfig/node20": "20.1.2",
    "ts-node": "10.9.1",
    "typescript": "5.3.2"
  }
}
  • Operating system and version: MacOS 11.6
@edosrecki
Copy link
Contributor Author

Closing in favor of existing issue: #2076

@bennycode
Copy link

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants