-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Importing this package into CJS project triggers false-positive TypeScript error #871
Comments
Could you provide a full code example for debug?
|
Hey! So the issue is happening in our repository https://github.com/rise-tools/rise-tools index.ts - https://github.com/rise-tools/rise-tools/blob/main/packages/cli/src/zx.ts Platform: Mac OS, Node 20 This could be related microsoft/TypeScript#49299 |
I would be happy to look into this and provide a proposed solution, once approved, submit a follow up PR. @antongolub et al, please let me know if you would consider a PR that fixes this. |
Expected Behavior
The following should work without any errors:
Actual Behavior
Triggers the following error:
However, the project works just fine. This is because
main
inpackage.json
is set to a CJS entry-point (thank you!)The only alternative I am aware of is setting
{type: module}
insideesm
build directory. It would be great ifzx
could be used in both ESM and CJS projects without warnings.The text was updated successfully, but these errors were encountered: