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

Cannot access 'xxx' before initialization #481

Open
5 tasks done
baixiaoyu2997 opened this issue Apr 1, 2024 · 1 comment
Open
5 tasks done

Cannot access 'xxx' before initialization #481

baixiaoyu2997 opened this issue Apr 1, 2024 · 1 comment

Comments

@baixiaoyu2997
Copy link

baixiaoyu2997 commented Apr 1, 2024

Describe the bug

can'n start dev server, according to my tests, this problem is related to the composables/useContract function. It should be caused by the fact that useContract has the same name as the parameter in sdk/util/common.ts. When I try to delete default in useContract After that, this error will not occur.

error in console :

Uncaught ReferenceError: Cannot access 'commonOwner' before initialization
    at optionFactoryContract.ts:3:22
client.ts:103 [vite] server connection lost. polling for restart...

Reproduction

https://stackblitz.com/edit/vitejs-vite-ep9btn?file=src%2Fcomposables%2FuseContract.ts

test step:

  1. npm run dev
  2. check console

System Info

stackblitz

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Copy link

stackblitz bot commented Apr 1, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

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

No branches or pull requests

1 participant