jolocom-lib icon indicating copy to clipboard operation
jolocom-lib copied to clipboard

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

Open elmariachi111 opened this issue 3 years ago • 0 comments

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/[email protected]/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.

elmariachi111 avatar Mar 03 '21 11:03 elmariachi111