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

@walletconnect/sign-client v2.13.0 type error #4569

Open
HeesungB opened this issue May 28, 2024 · 7 comments
Open

@walletconnect/sign-client v2.13.0 type error #4569

HeesungB opened this issue May 28, 2024 · 7 comments

Comments

@HeesungB
Copy link

HeesungB commented May 28, 2024

Describe the bug
I'm migrating to version 2.13.0 of @walletconnect/sign-client and I'm getting a typescript error.
This is the situation I saw when doing a tsc build.
It is okay on v2.12.2

../../node_modules/@walletconnect/core/dist/types/controllers/relayer.d.ts(13,5): error TS2416: Property 'provider' in type 'Relayer' is not assignable to the same property in base type 'IRelayer'.
  Type 'import("/Users/aa/bb/node_modules/@walletconnect/jsonrpc-types/dist/cjs/provider").IJsonRpcProvider' is not assignable to type 'import("/Users/aa/bb/node_modules/@walletconnect/types/node_modules/@walletconnect/jsonrpc-types/dist/types/provider").IJsonRpcProvider'.
    Property 'setConnection' is protected but type 'IJsonRpcProvider' is not a class derived from 'IJsonRpcProvider'.

SDK Version (if relevant)

  • Client: React(v18.2.0), Typescript(v5.0.4)
@HeesungB HeesungB added the type: bug Something isn't working label May 28, 2024
Copy link

linear bot commented May 28, 2024

@glitch-txs
Copy link
Member

Hi, could you share your package.json file?

@glitch-txs glitch-txs added Bundler Issue and removed type: bug Something isn't working labels Jun 11, 2024
@HeesungB
Copy link
Author

HeesungB commented Jun 11, 2024

@glitch-txs You can see below link

chainapsis/keplr-wallet#1128

The body of the error.

Error: ../../node_modules/@walletconnect/sign-client/node_modules/@walletconnect/core/dist/types/controllers/relayer.d.ts(13,5): error TS2416: Property 'provider' in type 'Relayer' is not assignable to the same property in base type 'IRelayer'.
  Type 'import("/home/runner/work/keplr-wallet/keplr-wallet/node_modules/@walletconnect/jsonrpc-types/dist/cjs/provider").IJsonRpcProvider' is not assignable to type 'import("/home/runner/work/keplr-wallet/keplr-wallet/node_modules/@walletconnect/types/node_modules/@walletconnect/jsonrpc-types/dist/types/provider").IJsonRpcProvider'.
    Property 'setConnection' is protected but type 'IJsonRpcProvider' is not a class derived from 'IJsonRpcProvider'.

lerna ERR! yarn run build exited 2 in '@keplr-wallet/wc-qrcode-modal'
lerna WARN complete Waiting for 4 child processes to exit. CTRL-C to exit immediately.
Error: Process completed with exit code 2.

@ganchoradkov
Copy link
Member

hey @HeesungB, I think this error is caused by out-of-date util dependencies. Please update all @walletconnect/ deps to their latest and the build should work correctly

@HeesungB
Copy link
Author

@ganchoradkov I think it that occurred by different version of @walletconnect/jsonrpc-utils between sign-client and types

"@walletconnect/jsonrpc-utils": "1.0.8",

"@walletconnect/jsonrpc-types": "1.0.4",

@glitch-txs
Copy link
Member

Could you run npm ls @walletconnect/sign-client?

@glitch-txs
Copy link
Member

I see you're probably right, in the meantime you can use "overrides" or "resolutions" If you're using yarn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants