ipfs-shipyard / js-libp2p-react-native

A demo app running js-libp2p in a React Native app
7 stars 3 forks source link

Error: WebSocket Servers can not be created in the browser! #4

Open burhon97 opened 4 months ago

burhon97 commented 4 months ago

Description

The basic example worked as expected. But when I tried to add custom listen multiaddrs, I got an error:

const node = await createLibp2p({
+      addresses: {
+        listen: ["/ip4/0.0.0.0/tcp/8004", "/ip4/0.0.0.0/tcp/8003/ws"],
+      },
        transports: [
          circuitRelayTransport({
            discoverRelays: 1,
          }),
...
Possible unhandled promise rejection (id: 0):
Error: WebSocket Servers can not be created in the browser!

Versions

MacBook Air: