For some reason a function I am calling is apparently not a function.
Welcome to Node.js v14.15.1.
Type ".help" for more information.
> const crypto = require("crypto");
undefined
> x = crypto.randomBytes(32).toString("hex")
Uncaught TypeError: crypto.randomBytes is not a function
Documentation for randomBytes().
Is there something I am not understanding?
For all who is NodeJS and seeking for answer:
import * as crypto from 'crypto';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With