jolocom / jolocom-lib

Library for interacting with the identity solution provided by Jolocom.
MIT License
24 stars 18 forks source link

(bug) utils requires ethers but it's not in your dependencies #453

Open elmariachi111 opened 3 years ago

elmariachi111 commented 3 years ago

Describe the bug When I try to initialize the SDK, I'm seeing

Error: Cannot find module 'ethers/lib/utils'
Require stack:
- /home/stadolf/work/univax/node_modules/.pnpm/jolocom-lib@5.1.1/node_modules/jolocom-lib/js/utils/helper.js
...

in your helper.ts you import from ethers (https://github.com/jolocom/jolocom-lib/blob/develop/ts/utils/helper.ts#L7) but your package.json requires etherumjs-util instead (https://github.com/jolocom/jolocom-lib/blob/develop/package.json#L80). That library contains the needed code but you require the "wrong" library. When I install ethers on my side it runs well. Think you only have to import your needed helpers from ethereumjs-util instead.