hypercore
hypercore copied to clipboard
Issue running hypercore 11.x in browser
Looks like that hypercore 11.x is tightly coupled to rocksdb-native. Is this intended?
if running in browser i get this error:
hypercore.js?v=f6bcbb36:38819 Uncaught ReferenceError: __filename is not defined
at node_modules/.pnpm/[email protected]/node_modules/rocksdb-native/binding.js (hypercore.js?v=f6bcbb36:38819:43)
at __require2 (chunk-P4LW5TZC.js?v=4eb89ddb:27:50)
at node_modules/.pnpm/[email protected]/node_modules/rocksdb-native/lib/column-family.js (hypercore.js?v=f6bcbb36:38871:19)
at __require2 (chunk-P4LW5TZC.js?v=4eb89ddb:27:50)
at node_modules/.pnpm/[email protected]/node_modules/rocksdb-native/index.js (hypercore.js?v=f6bcbb36:40024:24)
at __require2 (chunk-P4LW5TZC.js?v=4eb89ddb:27:50)
at node_modules/.pnpm/[email protected][email protected]/node_modules/hypercore-storage/index.js (hypercore.js?v=f6bcbb36:44443:19)
at __require2 (chunk-P4LW5TZC.js?v=4eb89ddb:27:50)
at node_modules/.pnpm/[email protected][email protected]/node_modules/hypercore/index.js (hypercore.js?v=f6bcbb36:55976:23)
Also hitting a wall downgrading to hypercore 10.x with replications as per this unsolved issue #452 :
Noise handshake failed
at NoiseSecretStream._onhandshakert (bundle.js?t=1699883966724:403:33)
at NoiseSecretStream._open (bundle.js?t=1699883966724:451:32)
at WritableState.updateNonPrimary (bundle.js?t=1699883966724:21823:14)
at WritableState.update (bundle.js?t=1699883966724:21798:72)
at WritableState.updateWriteNT (bundle.js?t=1699883966724:22147:10)
Did i miss something?
the __filename thing is your bundler, but yes it needs a holepunchto/hypercore-storage compat storage. i dont think we have a browser backed one atm (although one can be made)