holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.85k stars 136 forks source link

if (this.dst.core && !this.dst.core.writable) throw new Error('Destination must be writable') #362

Closed ghost closed 7 months ago

ghost commented 7 months ago

Hello friends, i have this problem in my code. How fix it?

if (this.dst.core && !this.dst.core.writable) throw new Error('Destination must be writable')

I use reader and then writer. (https://docs.holepunch.to/quick-start#hyperdrive-a-full-p2p-filesystem) If i add previously known key in writer - i get error. Can I use both writer and reader within one user? Or can only one user write in the kernel and the rest listen?

if(driveKey) { let key = b4a.from(${driveKey}, 'hex' ) drive = new Hyperdrive(store,key) } else { drive = new Hyperdrive(store) } await drive.ready()