Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running default examples throws where upnp isn't enabled #406

Open
azf20 opened this issue Jan 9, 2025 · 0 comments
Open

Running default examples throws where upnp isn't enabled #406

azf20 opened this issue Jan 9, 2025 · 0 comments

Comments

@azf20
Copy link

azf20 commented Jan 9, 2025

The default libp2p configuration includes a upnp configuration, so await createHelia() throws if this isn't supported (I am running on Apple M3, personal wifi):

Error: Service not found
    at Device.getService (<folder>/node_modules/.pnpm/@[email protected]/node_modules/@achingbrain/nat-port-mapper/src/upnp/device.ts:104:13)

I (think I) resolved by deleting the upnp variable:

const libp2p = libp2pDefaults()
libp2p.services = { ...libp2p.services }
delete (libp2p.services as any).upnp

const helia = await createHelia({
  libp2p,
})

But I am not sure about the downstream impact of this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant