orbitdb: Error: Non-base58 character
I am a beginner and I was trying to run the code in the docs
const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')
const ipfs = new IPFS({
repo:'./data',
EXPERIMENTAL:{
pubsub:true
}
})
ipfs.once('ready',()=>{
console.log('working')
var orbitdb=new OrbitDB(ipfs)
kv = orbitdb.kvstore('profile')
kv.set('hello',100).then(()=>{
console.log('hello')
}).catch((error)=>{
console.log(error)
})
}
)
This returned an error ‘TypeError: kv.set is not a function’ . Tried adding promise :
const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')
const ipfs = new IPFS()
ipfs.on('ready', async () => {
const orbitdb = new OrbitDB(ipfs)
const db = await orbitdb.keyvalue('first-database')
.catch((error)=>{
console.log(error)
})
})
The above code is returning : Error: Non-base58 character at Object.decode (D:\workspace\ipfs\orbit\node_modules\base-x\index.js:84:11) at Object.fromB58String (D:\workspace\ipfs\orbit\node_modules\multihashes\src\index.js:68:27) at Function.isValid (D:\workspace\ipfs\orbit\node_modules\orbit-db\src\orbit-db-address.js:22:74) at Function.parse (D:\workspace\ipfs\orbit\node_modules\orbit-db\src\orbit-db-address.js:36:25) at OrbitDB.create (D:\workspace\ipfs\orbit\node_modules\orbit-db\src\OrbitDB.js:214:38) at <anonymous>
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 21 (10 by maintainers)
Have the same error
same here, with a basic example code of the docs. Error: Non-base58 character. Windows 10, Node version 10.14.2