Skip to content

Issue running hypercore 11.x in browser #739

@fix

Description

@fix

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/rocksdb-native@3.9.0/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/rocksdb-native@3.9.0/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/rocksdb-native@3.9.0/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/hypercore-storage@1.17.0_sodium-javascript@0.8.0/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/hypercore@11.17.0_sodium-javascript@0.8.0/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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions