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
Typings issue with v3 #19
Comments
The common reason why imports failed for me seem to be the required fully specified path in the -"main": "dist",
-"types": "dist",
+"main": "./dist/index.js",
+"types": "./dist/index.d.ts", Changing that in the to be imported package allows the use of it with this config. Alternatively the I know that only ES Modules are supported since v1.0.0 and neither the TypeScript 4.7 nor Node.js 14 mentioned in the v3 release were the reason for this breakage. As far as I understand currently the Feel free to close it as it seems solved for me or keep it open for better visibility for others. |
I can confirm that with
The second is fixable locally, the first one requires a new version of the dependency |
Even with bugfix release v3.0.1 there seem to be an issue with typings from external packages.
For example Ava does not seem to work after upgrading to v3. But this issue is not exclusive to ava so I suspect either some problem with this tsconfig or some issue more packages did.
I created a minimal example of this issue and the PR updates to v3.0.1. The check on the main branch (v2) works fine while v3 fails.
https://github.com/EdJoPaTo/sindresorhus-tsconfig-ava-issue-minimal-example/pull/1
I don't know what the exact issue might be but I wanted to create a minimal example that can be looked upon more easily.
I suspected
esModuleInterop
but it isn't the case, it does not change the behaviour.I suspected some CommonJS / ES modules mixup but the minimal example is strictly only ES modules so it shouldn't be the case either?
tsc
Error message (the second results from the first):The text was updated successfully, but these errors were encountered: