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

You must mention all peer dependencies in package.json #227

Open
sbeben opened this issue Dec 19, 2024 · 0 comments
Open

You must mention all peer dependencies in package.json #227

sbeben opened this issue Dec 19, 2024 · 0 comments

Comments

@sbeben
Copy link

sbeben commented Dec 19, 2024

Guys, in your packages, for example in @v4-sdk, you import a lot of stuff from 'ethers/lib/utils', which is compatible with ethers v5 but not with v6.
Screenshot 2024-12-19 at 22 17 14

But, since it's not presented in any of package.json files, your imports are referencing workspace's ethers version, which is in a lot of times v6.
So, this leads to build crashes with Package subpath './lib/utils' is not defined by "exports" error across the globe.

For the ones who's seeing it, this resolves the issue.

//package.json
{
  "pnpm": {
    "packageExtensions": {
      "@uniswap/v4-sdk@*": {
        "dependencies": {
          "ethers": "5.7.2",
        }
      }
    }
  },
  "overrides": {
    "@uniswap/v4-sdk@*": {
      "ethers": "5.7.2"
    }
  },
  "resolutions": {
    "@uniswap/v4-sdk/ethers": "5.7.2"
  }
}
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