If I add the following lines into my code it throws the following error:
import { BIP32Interface } from "bip32";
let node: BIP32Interface = bip32.fromBase58(key);
Error:
Uncaught ReferenceError: Buffer is not defined
I'm using the same package in a Next.js app, so I think the problem here, that I haven't got node.js environment when compiling happens...
How could I pass this issue?
I tried: yarn add buffer ->
window.Buffer = window.Buffer || require("buffer").Buffer;
Any ideas?