-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promise rejection warning #75
Comments
I've got the same error with the following code: import IPFS from 'ipfs';
import Room from 'ipfs-pubsub-room';
const repo = () => (
`/ipfs/repo/${Math.random()}`
);
// create IPFS node
const ipfs = new IPFS({
repo: repo(),
EXPERIMENTAL: {
pubsub: true,
},
});
const room = new Room(ipfs, 'ipfs-pubsub-demo');
room.on('peer joined', (peer) => console.log(`peer ${peer} joined`));
room.on('peer left', (peer) => console.log(`peer ${peer} joined`));
ipfs.once('ready', () => ipfs.id((err, info) => {
if (err) { throw err; }
console.log(`IPFS node ready with address: ${info.id}`);
}));``` |
This seems to be because this library is expecting a newer version of js-libp2p. See changelog here: https://github.com/libp2p/js-libp2p/releases (api was changed from You can solve this issue by downgrading to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UnhandledPromiseRejectionWarning: TypeError: this._libp2p.pubsub.getSubscribers is not a function at PubSubRoom._pollPeers (ipfs-pubsub-room\src\index.js:106:49) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) (node:5828) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
I got this error when I made a Room with IPFS node. How to solve this?
The text was updated successfully, but these errors were encountered: