Skip to content

Conversation

@d0m1n1kr
Copy link

When we use this module in a worker thread we get a Uncaught Error: Module did not self-register when we require it.

The reason is, that the module registration is not context aware. When we change the initialization as described in
https://github.com/nodejs/node/blob/main/doc/api/addons.md#context-aware-addons it works for us.

Changing this could be a problem, if the module has a global state, but I could not find any, so I think it should work.

@d0m1n1kr d0m1n1kr changed the title Make the module initialization context-aware Draft: Make the module initialization context-aware May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant