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

Worker_Threads :: Module did not self-register #245

Open
ConflictingTheories opened this issue Aug 14, 2019 · 1 comment
Open

Worker_Threads :: Module did not self-register #245

ConflictingTheories opened this issue Aug 14, 2019 · 1 comment

Comments

@ConflictingTheories
Copy link

When I try to run a worker thread calling osmosis, it fails to load the module.

I can load everything else without issues, and when I remove all osmosis related code it runs fine.

As soon as I so much as require('osmosis') it immediately causes the thread to crash.

I can run osmosis on the main thread, but unfortunately I have tried everything I can think of to get it to run as worker.

  • upgraded to latest node causes an issue with with libxmljs, so I cannot do a gyp-rebuild for it.

  • I cannot go revert back below 11.7 as I need the worker threads, but something is not working correctly on the module.

  • The only thing I can think it might be after reading online is that the bindings are not setup correctly, but I am not too familiar with C++ modules which I believe this package uses.

The error I get when I try to require('osmosis') is as follows:

Error: Module did not self-register. at Object.Module._extensions..node (internal/modules/cjs/loader.js:750:18) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) at Module.require (internal/modules/cjs/loader.js:657:17) at require (internal/modules/cjs/helpers.js:20:18) at bindings (/home/kderbyma/Git/rig-radar-api/server/files/node_modules/bindings/bindings.js:84:48) at Object.<anonymous> (/home/kderbyma/Git/rig-radar-api/server/files/node_modules/libxmljs/lib/bindings.js:1:99) at Module._compile (internal/modules/cjs/loader.js:721:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) at Module.require (internal/modules/cjs/loader.js:657:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/kderbyma/Git/rig-radar-api/server/files/node_modules/libxmljs/index.js:4:16) at Module._compile (internal/modules/cjs/loader.js:721:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) at Module.require (internal/modules/cjs/loader.js:657:17) 'Uncaught Exception thrown'

Please - does anyone know how to correct this?

@BitFros7y
Copy link

Try removing (deleting) node_modules folder and doing clean install of packages after that (npm install)

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