TypeStrong / ts-node

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

Transpile-only doesn't work without tsconfig.json #2124

Open vsDizzy opened 3 months ago

vsDizzy commented 3 months ago

Search Terms

transpile-only tsconfig.json TS5109

Expected Behavior

No error

Actual Behavior

TSError: ⨯ Unable to compile TypeScript: error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.

Steps to reproduce the problem

  1. create stub src/app.ts
  2. node -r ts-node/register src/app.ts - ok
  3. node -r ts-node/register/transpile-only src/app.ts - error TS5109

Minimal reproduction

https://github.com/vsDizzy/ts-node-app

Specifications