node-osmosis icon indicating copy to clipboard operation
node-osmosis copied to clipboard

Worker_Threads :: Module did not self-register

Open ConflictingTheories opened this issue 6 years ago • 1 comments

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?

ConflictingTheories avatar Aug 14 '19 03:08 ConflictingTheories

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

BitFros7y avatar Aug 15 '19 12:08 BitFros7y