Open aldenquimby opened 3 weeks ago
This error could be because you haven't set the moduleResolution properly.
Did you use the ".mts" suffix on your typescript source file, or did you run the "npm pkg set type=module" command?
If not, please try to do that first.
@ccxvii I do have type=module
, but I'm using an older moduleResolution. I'll try updating to see if that fixes it!
I see now your docs say nodenext
is required. I believe if you add main
+ types
to the package.json, you could drop that requirement, making this a more widely usable library
But in the meantime, I'll see if I can get that resolution working in my project!
@ccxvii i confirmed that upgrading my moduleResolution fixed the issue, so feel free to close if you'd like! It's worth noting this was a decent effort, because many older libraries only work with moduleResolution=node. So it may still be nice for you to support the older moduleResolution
I installed
mupdf
in a TS project and ran into this error:Runtime code works fine, but TypeScript complains.
Adding the following to mupdf/package.json fixes the issue: