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

fix(core): update algosdk import to resolve CommonJS module issue #259

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented Sep 12, 2024

Description

This PR updates the import of Algodv2 from algosdk in src/store.ts to resolve a SyntaxError occurring in some consuming applications that use CommonJS modules.

Details

  • Changed the import of algosdk from named import to default import
  • Updated all references to Algodv2 to use the default import syntax
  • Resolves the error: "SyntaxError: Named export 'Algodv2' not found. The requested module 'algosdk' is a CommonJS module, which may not support all module.exports as named exports."

Closes #216

This commit changes the import of `Algodv2` from `algosdk` to use the default import syntax. This resolves a SyntaxError in consuming apps that use CommonJS modules.

Closes #216
@drichar drichar merged commit daf738a into main Sep 12, 2024
1 check passed
@drichar drichar deleted the fix/algosdk-commonjs-module branch September 12, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

algosdk is a CommonJS module
1 participant