-
Notifications
You must be signed in to change notification settings - Fork 28
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
Uncaught Error: Module did not self-register #26
Comments
Node version? |
node addons have to explicitly support workers for them to work in that scenario. The main reason for this is that some addons can have global state which would not work for multiple threads. |
V10.10 don't remember for sure.
пт, 1 мар. 2019 г., 17:27 mscdex <notifications@github.com>:
… node addons have to explicitly support workers for them to work in that
scenario. The main reason for this is that some addons can have global
state which would not work for multiple threads.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAc7oaI6KkJryXwxystvT-bulHkHbMdmks5vSUbbgaJpZM4bZDHs>
.
|
But calling require not in the global scope, works without errors. Problem
exists only when define module in the top most place (i.e. global scope)
вс, 3 мар. 2019 г., 10:13 Denis Abramov <somebi@gmail.com>:
… V10.10 don't remember for sure.
пт, 1 мар. 2019 г., 17:27 mscdex ***@***.***>:
> node addons have to explicitly support workers for them to work in that
> scenario. The main reason for this is that some addons can have global
> state which would not work for multiple threads.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#26 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAc7oaI6KkJryXwxystvT-bulHkHbMdmks5vSUbbgaJpZM4bZDHs>
> .
>
|
Can you show an example of each? |
I have meet same issue when tried to require xxhash in thread (node v12.8.1, pull/30 applied). But was able to solve it by changing src/hash.cc:
and re-build binary: Code to reproduce the issue:
|
Getting this error... removing node_modules or npm rebuild is not helping.
This error is thrown when i'm using threads (workers)
The text was updated successfully, but these errors were encountered: