cryptocoinjs / keccak

Keccak sponge function family
MIT License
86 stars 24 forks source link

Keccak error when using dai.js #12

Closed T0BiD closed 4 years ago

T0BiD commented 5 years ago

Hey, I hope this is the right place for my problem. I tried using dai.js with angular and it seems it has problems with keccak, as I get the follow error:

core.js:15724 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'prototype' of undefined
TypeError: Cannot read property 'prototype' of undefined
    at inherits (inherits_browser.js:5)
    at push../node_modules/keccak/lib/api/keccak.js.module.exports (keccak.js:21)
    at push../node_modules/keccak/lib/api/index.js.module.exports (index.js:6)
    at Object../node_modules/keccak/js.js (js.js:2)
    at __webpack_require__ (bootstrap:83)
    at Object../node_modules/ethereumjs-util/dist/index.js (index.js:5)
    at __webpack_require__ (bootstrap:83)
    at Object../node_modules/@makerdao/dai/src/eth/accounts/factories.js (factories.js:18)
    at __webpack_require__ (bootstrap:83)
    at Object../node_modules/@makerdao/dai/src/eth/AccountsService.js (AccountsService.js:38)
    at resolvePromise (zone.js:831)
    at resolvePromise (zone.js:788)
    at zone.js:892
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Object.onInvokeTask (core.js:17290)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
    at drainMicroTaskQueue (zone.js:601)

Can anyone help me find the problem?

fanatid commented 5 years ago

@T0BiD can you paste full example for reproducing problem?