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

thread error: Error: Module did not self-register #60

Open
CKzcb opened this issue Jun 9, 2023 · 2 comments
Open

thread error: Error: Module did not self-register #60

CKzcb opened this issue Jun 9, 2023 · 2 comments

Comments

@CKzcb
Copy link

CKzcb commented Jun 9, 2023

The following erro occurred when i use msgpack in worker-thread

[2023-06-09T15:59:10.621] [ERROR] default - thread error: Error: Module did not self-register: 'xxxxxx\node_modules\msgpack\build\Release\msgpackBinding.node'.
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)       
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (H:\company\sg2\tsgf\node_modules\msgpack\lib\msgpack.js:6:14)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)      
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12) {        
  code: 'ERR_DLOPEN_FAILED'
}
@CKzcb
Copy link
Author

CKzcb commented Jun 9, 2023

there is a solution for it referencing worker threads throws exception while loading npm lib #21783

it need chang this

// NODE_MODULE(msgpackBinding, init);
NODE_MODULE_INIT()
{
    init(exports);
}

@CKzcb
Copy link
Author

CKzcb commented Jun 9, 2023

I wonder why not find the fix in source code,

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