Ping tutorial doesn't works

I’m trying to follow the ping tutorial in the following URL

I manage to ping the remote peer and see the pinging remote peer at /ip4/ message

However the p.on('ping', time => { callback doesn’t being called and I don’t see the pinged /ip4/ message any idea what I’m missing?


I’m having the same issue with the ping tutorial. My exact error is
const muxedConn = muxer.listener(conn)

TypeError: muxer.listener is not a function…"
in the remote peer I’m trying to ping. I reimplemented the entire tutorial but it still gives the same error. Any idea what’s going on?

@Paris can you try using a different version of libp2p mplex? npm i libp2p-mplex@0.8.5. There may be an npm version tagging issue we need to correct that could be causing your problem.

@shahafa is your code up anywhere that I could take a look at?

We are close to releasing a large refactor of js-libp2p and will be updating the examples on the docs site to match. As part of this I would like to get the full example code linked to a repo so that it’s easier to verify against what you’ve built. Would that be helpful?

@jacobheun please find the code in the following link