hypercore-protocol / p2p-multiwriter-with-autobase

p2p posting & voting workshop
69 stars 15 forks source link

TypeError: baseA.createRebasedIndex is not a function #12

Closed pavanyogi closed 2 years ago

pavanyogi commented 2 years ago

We are getting errors during the execution of the code. I think it can be related to versions mismatch etc.

pavany@u-16:~/.../04b$ node autobase-2.js B1: yep. great time. A1: likewise. fun exercise huh? B0: hi! good to hear from you A0: hello! file:///home/pavany/Documents/aux/qbix/hypercore/HypercorePlayground/p2p-multiwriter-with-autobase/04b/autobase-2.js:32 const index = baseA.createRebasedIndex(indexCore); ^

TypeError: baseA.createRebasedIndex is not a function at file:///home/pavany/Documents/aux/qbix/hypercore/HypercorePlayground/p2p-multiwriter-with-autobase/04b/autobase-2.js:32:21 at processTicksAndRejections (internal/process/task_queues.js:93:5) pavany@u-16:~/.../04b$

Repo: https://github.com/Qbix/HypercorePlayground

mafintosh commented 2 years ago

Yes the autobase had some api updates recently and we forgot to update these examples, we’ll get that fixed. For now see the autobase readme

andrewosh commented 2 years ago

Just updated the problems to use the new Autobase API. Sorry about that @pavanyogi -- you'll want to use base.linearize instead of base.createRebasedIndex now