Closed thany closed 2 years ago
A workaround, if you can even call it that, is to use overrides
in the package.json
:
{
"overrides": {
"tsdx": {
"typescript": "4.4.2"
}
}
}
Now, every single mention of the use of overrides
, on the whole internet, entirely fails to mention that you should also reinstall any affected packages, so following this change with a npm i tsdx
should solidify this override.
However, it's a really sorry excuse for a workaround, because it reveals errors when doing a npm list --depth=1
. At least this command reveals if the override has worked:
In my case, those errors do not appear to break anything, but still. I feel dirty 🙂 This just emphasises how important it is to keep up.
Duplicate of #926 etc
Regarding peerDeps, that is much easier said than done, please see https://github.com/jaredpalmer/tsdx/pull/985#issuecomment-791479189 for a summary.
Current Behavior
It's compiling against its own installed version of typescript 🤨
Expected behavior
Use the typescript version that's installed with a project, to compile it.
Suggested solution(s)
Set typescript as a peerDependency and tell users to install it themselves. I dont know how TSDX would handle that, but dictating a specific version is ridiculous, given the amount of new features Typescript still has from version to version.
Additional context
I don't want to be dependent on TSDX to dictate which version of Typescript can be used. Doesn't that make sense?
Your environment
(browser is missing though, but who cares about browsers in TSDX)