Skip to content
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

[Bug]: CJS build incorrectly imports ESM module #400

Open
1 task done
TimoGlastra opened this issue Jan 27, 2025 · 0 comments
Open
1 task done

[Bug]: CJS build incorrectly imports ESM module #400

TimoGlastra opened this issue Jan 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@TimoGlastra
Copy link

What went wrong?

The @cheqd/sdk module exports both ESM and CJS builds in cjs / esm folders. however the CJS build imports the @cheqd/ts-proto module using require.

When importing ESM from a CJS module, it needs to be imported using await import, thus the CJS output from the cheqd sdk is incorrect.

Since the cheqd/ts-proto module already only supports ESM, I think it may make sense to also only support ESM for the cheqd SDK, or fix the imports in the CJS build of the cheqd sdk

How can we reproduce this bug?

...

Environment

Not applicable

Bug prevalence

No response

Which browser/client application did you encounter the bug in? (if applicable)

Not applicable

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant