Comments (4)
Hi @vijayee, we're currently in the middle of the next release of IPFS and the dependencies are a little wonky atm. Thanks for reporting the issue!
You will be able to get the ipfs-api example working by using a fork of js-ipf-api by installing it with npm npm i @haad/ipfs.api
and then requiring it const IpfsApi = require('@haad/ipfs-api')
. That version contains support for the missing pubsub both in js-ipfs-api and in the actual go-ipfs daemon.
We're working on getting the js-ipfs version working again, I 'm fairly confident that will land next week.
from orbitdb.
@haadcode, thanks, I'll give it a shot with this version of the api.
from orbitdb.
I get another error with the '@haad/ipfs-api' module coming from stream-to-json-value
2016-12-12T16:12:15.355Z [ERROR] orbit-db.IPFSPubSub: SyntaxError: Unexpected token p in JSON at position 4
at JSON.parse (<anonymous>)
at streamToValue (/home/victor/Workspace/src/github.com/vijayee/orbit-db-sandbox/node_modules/@haad/ipfs-api/src/stream-to-json-value.js:25:18)
at res.pipe.concat (/home/victor/Workspace/src/github.com/vijayee/orbit-db-sandbox/node_modules/@haad/ipfs-api/src/stream-to-value.js:9:29)
at ConcatStream.<anonymous> (/home/victor/Workspace/src/github.com/vijayee/orbit-db-sandbox/node_modules/concat-stream/index.js:36:43)
at emitNone (events.js:91:20)
at ConcatStream.emit (events.js:185:7)
at finishMaybe (/home/victor/Workspace/src/github.com/vijayee/orbit-db-sandbox/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:475:14)
at afterWrite (/home/victor/Workspace/src/github.com/vijayee/orbit-db-sandbox/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:361:3)
at _combinedTickCallback (internal/process/next_tick.js:80:20)
at process._tickCallback (internal/process/next_tick.js:98:9)
(node:17389) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Hash can't be null!
(node:17389) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
from orbitdb.
We just released a new version which includes fixes for the examples. See https://github.com/haadcode/orbit-db/tree/master/examples for all the examples.
You can now do:
npm install orbit-db ipfs-daemon
const IPFS = require('ipfs-daemon/src/ipfs-node-daemon')
const OrbitDB = require('orbit-db')
const ipfs = new IPFS()
ipfs.on('error', (e) => console.error(e))
ipfs.on('ready', (e) => {
const orbitdb = new OrbitDB(ipfs)
const db = orbitdb.eventlog("feed name")
db.add("hello world")
.then(() => {
const latest = db.iterator({ limit: 5 }).collect()
console.log(JSON.stringify(latest, null, 2))
})
})
@vijayee, thanks for waiting. If you encounter more problems, let us know!
from orbitdb.
Related Issues (20)
- In React, Uncaught Error: Cannot find module 'interface-datastore/key' HOT 2
- Database stalls on traverseAndVerify() HOT 2
- a priori knowledge of database address HOT 12
- TimeoutError: request timed out when syncing between databases HOT 5
- Local network only IPFS HOT 14
- How to sync with several databases HOT 5
- Remove malicious node HOT 3
- Restarted orbitdb is not informed in update listener about all new added documents HOT 10
- why node 20? HOT 3
- Recover from [AggregateError: All promises were rejected] Error: Want for xyz aborted HOT 4
- Uncaught Error: Could not append entry: although write access is granted HOT 7
- Error: fetching raw block for CID HOT 4
- TS7016: Could not find a declaration file for module @orbitdb/core. HOT 3
- Error: No native build was found for platform=darwin arch=arm64 runtime=node abi=115 uv=1 armv=8 libc=glibc node=20.11.0 webpack=true HOT 1
- Log Entries created on remote/other Peers are not Pinned Locally HOT 5
- database record limits for acceptable lookup performance HOT 7
- Error: Want for bafyreighfb3szinnqrktnuyriifexl2bcgpisbrlbaxfs4kgqp6ocwjbmy aborted HOT 11
- Sync only to N entries. HOT 1
- Issue with GETTING_STARTED.md LevelBlockstore HOT 2
- Issue with GETTING_STARTED.md page HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbitdb.