Hi team,
I was trying to integrate a libp2p application in Ethereum Blockchain. While building a libp2p bundle, I get an error message as below:
Error: Expected a value of type
undefined
fortransport
but received[{},{"sioOptions":{"transports":["websocket"],"force new connection":true},"discovery":{"_events":{},"_eventsCount":0},"listenersRefs":{}}]
.
Code in index.js:
const node = new Node(peerInfo, peerBook, {
webRTCStar: true
})
...
...
class Node extends libp2p {
constructor (peerInfo, peerBook, options) {
options = options || {}
const wstar = new WebRTCStar()
const modules = {
transport: [new WS(), wstar],
connection: {
muxer: [mplex],
crypto: [secio]
},
discovery: [wstar.discovery]
}
super(modules, peerInfo, peerBook, options)
}
}
I don’t understand why showing the error messages. I tested the same libp2p application in meanstack and it works fine. Any ideas?