FabricLabs / fabric

Fabric is an experimental protocol for exchanging information.
https://fabric.pub
MIT License
58 stars 28 forks source link

Debug polyfill buffer error #121

Open victorwu opened 2 years ago

victorwu commented 2 years ago

Error stems from fabric.http.js minified file. WASM_BUFFER is used in secp256k1 which is a wasm compiled dependency. Line producing the error const WASM_BUFFER = new Uint8Array(wasm.memory.buffer);

victorwu commented 2 years ago

https://github.com/web3/web3.js#troubleshooting-and-known-issues

victorwu commented 2 years ago

https://stackoverflow.com/questions/64557638/how-to-polyfill-node-core-modules-in-webpack-5

victorwu commented 2 years ago

Integrating wasm to webpack did not make any progress, showed same errors

victorwu commented 2 years ago

ordering of dependencies could cause issues, list parent dependencies below child dependencies

victorwu commented 2 years ago

https://viglucci.io/how-to-polyfill-buffer-with-webpack-5