Skip to content

crypto.randomBytes is not a function #18

@irelandscape

Description

@irelandscape

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions