Is it possible to use libp2p in a electron project ? (Electron:16.0.7, Node:16.17.0)
I am trying to create a libp2p network using the main.js process (to be not limited by a web only network).
But as soon as I add
import { PubSubPeerDiscovery } from '@libp2p/pubsub-peer-discovery'
I have a ERR_PACKAGE_PATH_NOT_EXPORTED error, which is the same error as if require
is used. The same error occurs with @libp2p/webrtc-star-signalling-server
which is also ESM only.
To reproduce it, I’ve asked also in Quasar discussions as this may come from the Quasar/Electron setup.
I have tried a lot of setup, as explained here for example, but nothing works, so I wonder if this is even possible.