wormhole icon indicating copy to clipboard operation
wormhole copied to clipboard

"ethers" is being included as a devDependency

Open cosullivan opened this issue 3 years ago • 3 comments

Hi,

With the SDK, the ethers package is being included as a devDependency which means that it has to be installed separately when using the package.

This should be a dependency instead.

Thanks, Cain.

cosullivan avatar Nov 17 '21 01:11 cosullivan

I got the same problem too.

Error: Cannot find module 'ethers/lib/utils'
Require stack:
- /Users/abehjati/src/pyth/pyth-crosschain/ethereum/node_modules/@certusone/wormhole-sdk/lib/cjs/utils/aptos.js
- /Users/abehjati/src/pyth/pyth-crosschain/ethereum/node_modules/@certusone/wormhole-sdk/lib/cjs/utils/index.js
- /Users/abehjati/src/pyth/pyth-crosschain/ethereum/node_modules/@certusone/wormhole-sdk/lib/cjs/rpc/getSignedVAAWithRetry.js
- /Users/abehjati/src/pyth/pyth-crosschain/ethereum/node_modules/@certusone/wormhole-sdk/lib/cjs/rpc/index.js
- /Users/abehjati/src/pyth/pyth-crosschain/ethereum/node_modules/@certusone/wormhole-sdk/lib/cjs/index.js

ali-bahjati avatar Oct 27 '22 10:10 ali-bahjati

Likely, the entire SDK should be switched to using peer-dependencies for these sorts of things.

evan-gray avatar Nov 21 '22 17:11 evan-gray

Well.. if the types are used in the package type definitions then maybe it should be marked as dependency, shouldn't it? Or then again everyone needs to skip lib type check.

ali-bahjati avatar Nov 21 '22 17:11 ali-bahjati