js: @thirdweb-dev/sdk incompatibility issue with ethers v6

I’m encountering an issue related to ethers v6 with @thirdweb-dev/sdk.

The specific error is: Cannot find module 'ethers/lib/utils' from '../../../node_modules/.pnpm/@thirdweb-dev+sdk@4.0.19_ethers@6.9.0_typescript@5.3.2/node_modules/@thirdweb-dev/sdk/dist/index-0cf99325.cjs.dev.js'. This appears to stem from a change in the file path structure in ethers v6 (refer to this issue for more details).

To work around this, I’ve temporarily resorted to creating an alias for ethers as "ethers6": "npm:ethers@^6.9.0", allowing us to use it throughout the project via import { ethers } from 'ethers6';, while also maintaining ethers v5.7.2.

However, this solution is quite hacky and not ideal. It would be greatly beneficial for @thirdweb-dev/sdk to extend support to ethers v6, especially considering it has reached a stable release. Currently, @thirdweb-dev/sdk is the sole dependency in our stack that is causing compatibility issues with ethers v6.

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Reactions: 6
  • Comments: 18 (8 by maintainers)

Most upvoted comments

@sebpalluel @bennettl thank you for submitting the issue - we’re actively working on an upgrade that will allow to use the SDK alongside ethers v6, v5 and viem.

Will update here with progress updates - cc @jnsdls

We’re close to opening up the alpha version of our new SDK which will be compatible with ethers 5, 6 and viem.

Here’s the alpha tester sign up link if you’re interested: https://docs.google.com/forms/d/e/1FAIpQLSfMTy_1ZKPHAGIs8hQAlLfR_Xur1tw5soF_fEumFawdBEhK5g/viewform?usp=send_form

Adding @saminacodes and @jnsdls for 👀