usecannon / cannon

Manage EVM protocol deployments. Inspired by Docker, Terraform, and npm.

Home Page:https://usecannon.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannon CLI crashes out with ERR_PACKAGE_PATH_NOT_EXPORTED when ethers 6 is installed in a project

kyelewis opened this issue · comments

The cannon CLI will fail to run inside a project with ethers 6 installed, and the builder peerDependency isn't constrained enough to pick up on the version issue.

The @usecannon/builder package defines a peerDependency on "ethers": ">=5.6.0", and ethers 6.x is a match to this

However, builder is not compatible with ethers 6, because it has a a number of import references to ethers/lib/utils which no longer exists as an export in ethers 6.

Thus the CLI will fail with ERR_PACKAGE_PATH_NOT_EXPORTED: Package subpath './lib/utils' is not defined by "exports".

commented

Hey @kyelewis! Thanks for bringing this up, It's likely a good idea that we lock down the ethers version to stay <v6. As what you say is true that their v6 introduces breaking changes in our codebase.