Closed monicanagent closed 3 years ago
It looks like this was introduced in https://github.com/libp2p/js-libp2p/pull/313. The issue with enabling the dht by default is that we don't package a dht module with libp2p. So if the dht is not configured, libp2p errors on startup, which is the case in the pubsub example.
The dht change should probably be reverted. Perhaps an alternative route to enabling it by default would be to add some pre-configured bundles to libp2p with clear peerDependencies
that users should add to the package.json file. @vasco-santos thoughts?
I think we should keep it enabled by default, taking into consideration that we want people to start using it, in order to allow the implementation to be exposed to a bigger network.
In this way, I think that we should go with the pre-configured
bundles to libp2p. Do you agree?
My thought is to revert it for the 0.25 release, so that it doesn't block the js-ipfs release, as I'd prefer not to rush the bundle work. With it being enabled by default in the upcoming js-ipfs release, if we target the bundles and having it on by default for the next libp2p 0.26 release, we'd get a little more time to talk through the bundle options and still get more dht exposure via ipfs.
All right, that's fine for me! We can go that way then :)
This is no longer an issue.
Type: Bug
Severity: Low
Description: The PubSub example ends with a TypeError:
Steps to reproduce the error:
Clone js-libp2p trunk to desktop.
In cloned folder run
npm install
to install all dependencies.Run
npm audit fix
to attempt to fix 3 low-priority vulnerabilities. Result:(I can update this issue with details on the reported vulnerabilities--please let me know if it's relevant)
In
{trunk}\examples\pubsub
runnode 1.js
(nodejs 1.js
on Ubuntu) -- after a few moments the error is reported and example terminates.