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

Mixing multiple versions of codechain-primitives makes weird errors. #375

Open
foriequal0 opened this issue Apr 9, 2019 · 1 comment
Open

Comments

@foriequal0
Copy link
Contributor

Expected either PlatformAddress or string but found cccqyhk4388mymckk40ctf0skgkl8nf89f6sgpzwzke
       at Function.ensure (.../node_modules/codechain-sdk/node_modules/codechain-primitives/src/address/PlatformAddress.ts:105:19)
       at .../node_modules/codechain-sdk/lib/rpc/chain.js:473:98
       at new Promise (<anonymous>)
       at ChainRpc.getBalance (.../node_modules/codechain-sdk/lib/rpc/chain.js:471:16)
       at Promise.all.addresses.map.address (.../src/CCC.ts:9:48)
       at Array.map (<anonymous>)
       at Object.getCCCBalances (.../src/CCC.ts:9:19)
       at main (.../src/index.ts:94:46)
       at processTicksAndRejections (internal/process/next_tick.js:81:5)
@majecty
Copy link
Contributor

majecty commented Apr 17, 2019

How about using peer dependencies?

An Article about Peer dependencies
The above article shows an example of "winston" and "winston-mail" package.
It seems very similar to our "codechain-sdk" and "codechain-primitive"'s relationship.

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

2 participants