How to connect to Kubo using Helia with a swarm key in the private network?

I am trying to use the example pnet example to connect Kubo node with Helia node using swarm key. The IP addresses of Helia node and Kubo node are different, and I have added Multiaddress “/ip4/KuboNodeIP/tcp/4001/p2p/KuboNodeID” in the Bootstrap list. However, Helia node failed to dial Kubo node with error “The dial request has no valid addresses, ERR_NO_VALID_ADDRESSES”. Please, help me with this :smiling_face_with_tear:.

ERR_NO_VALID_ADDRESSES happens when the node does not have transports configured for the address type.

Are you running Helia in a browser and trying to dial a Kubo TCP address?

If not, can you please post a runnable example so we can take a look? A link to a public GitHub repo is fine.