Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot import mdns from a Worker #258

@bguezzie

Description

@bguezzie

I am trying to use mdns from inside of a Node.js Worker, but when I do I get the following error:
Module did not self-register: '/<...snipped...>/node_modules/mdns/build/Release/dns_sd_bindings.node'.

The import statement (written in TypeScript) is:
import mdns, {Browser, Service} from "mdns";

When I do this from the main thread, it works like a charm. I have done all the usual npm/node_modules tricks online trying to resolve and/or rebuild the library, but no dice.

OS: MacOS 12.5.1
Node: 18.9.0
mdns: 2.7.2

Please let me know what other information would be helpful here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions