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

build: esm #31

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

build: esm #31

wants to merge 6 commits into from

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Aug 29, 2023

When using the CLI installed globally locally from npm, we are facing following issue:

ic-hardware-wallet --network https://nnsdapp.dfinity.network icp balance
Error: ReferenceError: Cannot access 'listenTimeoutId' before initialization

@lmuntaner narrowed the issue to listenTimeoutId which is indeed used before its declaration in the ledger-hq Transport feature.

While moving from CJS to ESM might not solve the issue, we found this issue evanw/esbuild#542 (comment) in esbuild where the creator of the library recommend to move to ESM to maybe solve the issue. So we thought it's worth giving a shot.

That said, when I look at the generated code, it still seems that the var listenTimeoutId is declared after it's usage, so not sure ultimately if it will really works out.

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.

1 participant