steemit / libcrypto-js

Cryptographic utilities for Steem in Javascript. Zero dependencies.
5 stars 17 forks source link

crypto.randomBytes is not a function #18

Open irelandscape opened 6 years ago

irelandscape commented 6 years ago

I'm having an issue in a vue.js application using steem-js and steemit/libcrypto.js.

require('steem.js')

throws the following exception: TypeError: crypto.randomBytes is not a function

raised in the "nodeRandom" function of secure-random.js It looks like nodeRandom invokes: require('crypto') then "randomBytes" on the result.

However require('crypto') is returning an empty object in my environment. I'm wondering if steemit/libcrypto-js is clashing with node.js crypto.

Thanks for your assistance!