In a consumer project, running Node without bundling, ran into issues with the imports. To ensure this doesn't happen, the "moduleResolution" should be set to "NodeNext" as per TypeScript documentation and blog: https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler
_"On the other hand, if you’re writing a library that’s meant to be published on npm, using the bundler option can hide compatibility issues that may arise for your users who aren’t using a bundler. So in these cases, using the node16 or nodenext resolution options is likely to be a better path."
Alternative to doing this is to run a minimal bundle/transipiling process before publishing.
In a consumer project, running Node without bundling, ran into issues with the imports. To ensure this doesn't happen, the "moduleResolution" should be set to "NodeNext" as per TypeScript documentation and blog: https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler _"On the other hand, if you’re writing a library that’s meant to be published on npm, using the bundler option can hide compatibility issues that may arise for your users who aren’t using a bundler. So in these cases, using the node16 or nodenext resolution options is likely to be a better path."
Alternative to doing this is to run a minimal bundle/transipiling process before publishing.