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

Module did not self-register error #3

Closed
slobad123 opened this issue Sep 9, 2019 · 3 comments
Closed

Module did not self-register error #3

slobad123 opened this issue Sep 9, 2019 · 3 comments

Comments

@slobad123
Copy link

I ran into a "Module did not self-register" when trying to require("posix-semaphore") in a worker thread (when it was also required by the main thread).

Some searching on the issue led me to these links
nodejs/node#21783 (comment)
https://nodejs.org/api/addons.html#addons_context_aware_addons

I am not familiar with C++ addons, but it looks like using NODE_MODULE_INIT in addon.cc rather than NODE_MODULE might apply here.

I would be happy to help test the change or can work on a PR when I get the time (though logging the issue for now). Thanks

@dbousque
Copy link
Owner

dbousque commented Sep 9, 2019

Hi @slobad123. Thanks for the report. It should be fixed in version 0.0.4, which has just been published. Let me know if that fixes it for you :)

@dbousque dbousque closed this as completed Sep 9, 2019
@slobad123
Copy link
Author

It works! You're the best. Thanks

@dbousque
Copy link
Owner

dbousque commented Sep 9, 2019

Haha thanks. Have a good one

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

2 participants