Closed NORAVemp closed 1 year ago
maybe you need to install package buffer
I am getting this error when I install buffer
ERROR Buffer is not defined ReferenceError: Buffer is not defined at ./node_modules/tiny-secp256k1/rfc6979.js (http://localhost:3000/static/js/bundle.js:75088:14) at options.factory (http://localhost:3000/static/js/bundle.js:80970:31) at webpack_require__ (http://localhost:3000/static/js/bundle.js:80393:33) at fn (http://localhost:3000/static/js/bundle.js:80627:21) at ./node_modules/tiny-secp256k1/js.js (http://localhost:3000/static/js/bundle.js:74841:32) at options.factory (http://localhost:3000/static/js/bundle.js:80970:31) at webpack_require__ (http://localhost:3000/static/js/bundle.js:80393:33) at fn (http://localhost:3000/static/js/bundle.js:80627:21) at ./node_modules/bitcoinjs-lib/src/script.js (http://localhost:3000/static/js/bundle.js:17171:13) at options.factory (http://localhost:3000/static/js/bundle.js:80970:31)
Looks like that it's a problem with wasm.
./node_modules/tiny-secp256k1/js.js
js.js file is from a pre-WASM version.
webpack doesn't automatically include Buffers anymore, you need to add a plugin to your config or create a polyfill.
Here's the first google search result for webpack buffer is not defined
:
xxxx/bitcoinjs-lib/src/script_signature.js buffer is not defined what happened