orbitdb / field-manual

The Offical User's Guide to OrbitDB
207 stars 43 forks source link

Code example in 02 Managing Data errors #163

Open MinmoTech opened 2 years ago

MinmoTech commented 2 years ago

When running the code in https://github.com/orbitdb/field-manual/tree/main/code_examples/01_Tutorial/02_Managing_Data I get the following error:

index.min.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
    at e5e (index.min.js:2:44263)
    at Object.encode (index.min.js:2:44408)
    at WC.encode (index.min.js:2:43603)
    at N5e (index.min.js:2:55810)
    at g6e (index.min.js:120:385785)
    at b6e.wantBlock (index.min.js:120:386044)
    at k6e.get (index.min.js:120:392581)
    at Uce.get (index.min.js:113:29555)
    at hb.get (index.min.js:113:63383)
    at index.min.js:52:118794
  | e5e | @ | index.min.js:2
-- | -- | -- | --
  | encode | @ | index.min.js:2
  | encode | @ | index.min.js:2
  | N5e | @ | index.min.js:2
  | g6e | @ | index.min.js:120
  | wantBlock | @ | index.min.js:120
  | get | @ | index.min.js:120
  | get | @ | index.min.js:113
  | get | @ | index.min.js:113
  | (anonymous) | @ | index.min.js:52
  | (anonymous) | @ | index.min.js:28
  | NPP.onready | @ | (index):16
  | await in NPP.onready (async) |   |  
  | _init | @ | newpieceplease.js:34
  | await in _init (async) |   |  
  | create | @ | newpieceplease.js:18
  | await in create (async) |   |  
  | (anonymous) | @ | (index):51

I simply downloaded the files and started a webserver with python -m http.server 8000

Edit: same issue here: https://github.com/orbitdb/field-manual/tree/main/code_examples/01_Tutorial/03_Structuring_Data