-
Notifications
You must be signed in to change notification settings - Fork 521
Since v6.5.0
passing compilerOptions to tsoa.json will throw an exception in ts.createProgram
#1727
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†8000 ™ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello there alanszp 👋 Thank you for opening your very first issue in this project. We will try to get back to you as soon as we can.👀 |
v6.5.0
passing compilerOptions is using incorrectly ts.createProgramv6.5.0
passing compilerOptions to tsoa.json will throw an exception in ts.createProgram
Any chance you also reverted tsoa's typescript version via lock file when up/downgrading? |
@WoH No, I didn't change the typescript version. |
I can confirm this also happens with any 6.x version of tsoa. When I originally got the error with v6.6.0 and then stumbled upon this bug report, I tried each preceding version to identify the last working one. They all failed the same way until I installed 5.1.1. In my case, I'm on Node v22, using TypeScript 5.7.3. |
I can reproduce this as well. Using a similar setup:
The last known version that works for me is |
Can also reproduce. Running node v22.13.1 and typescript 5.7.3. Specifically the "module" and "target" flags cause the issue for me. My compiler options:
|
Uh oh!
There was an error while loading. Please reload this page.
Since
v6.5.0
passing compilerOptions in tsoa.json is raising an error when using ANY cli fn:I isolate the
v6.5.0
since I tried the same code in v6.4.0 and it still works.Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
Running
yarn add @tsoa/cli@6.4.0
and thenyarn tsoa spec-and-routes
produces:Node Version 20 and 22 (tried both)
tsoa.json
Current Behavior
Running
yarn add @tsoa/cli@6.5.0
and thenyarn tsoa spec-and-routes
produces:Possible Solution
I tried monkeypatching the code in MetadataGenerator.setProgramToDynamicControllersFiles to parse the
this.compilerOptions
with parseJsonSourceFileConfigFileContent before sending to createProgram and its working!Steps to Reproduce
Context (Environment)
Version of the library: v6.5.0
Version of NodeJS: 22 or 20
Breaking change?
It's only happening since v6.5.0
The text was updated successfully, but these errors were encountered: