-
Notifications
You must be signed in to change notification settings - Fork 27
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
Batteries cannot be imported with "module": "NodeNext"
#190
Comments
I think I should declare “exports” in the root package.json I had this issue too when using .mjs |
I tried using
In particular, this line:
It looks like TS is stripping the |
I wonder how does that work out for fp-ts maybe the double nested path? |
I'm seeing that it also fails for fp-ts: EDIT: I found the issue: gcanti/fp-ts#1726
But it's supposed to be:
|
Can be imported when using tsconfig
"module": "CommonJS"
, but in"NodeNext"
it breaks with the error:Cannot find module 'cmd-ts/batteries/fs' or its corresponding type declarations.
I'm not sure if this is an issue with how cmd-ts uses a package.json to redirect to
dist
, or if it's a bug in TypeScript's resolver. I'm using TS 4.9.5The text was updated successfully, but these errors were encountered: