Error: Module did not self-register while using native node module

See original GitHub issue

I am using webworker-threads and compiled WebWorkerThreads.node with exact the same node version pkg packaged the exececutable (v6.10.3). Do I miss some todo(s) else anywhere to use a native module? I also tried pkg . -boption with the same result.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:36 (3 by maintainers)

github_iconTop GitHub Comments

20reactions
ArosPrincecommented, Jun 4, 2018

OK, it’s kind of funny but for us the solution was to rename the generated executable to node.exe. The inspiration comes from here. See “Native modules”.

It might be a good idea to either solve it or at least mention it in the documentation.

10reactions
matheussampaiocommented, Jul 26, 2017

I’m having a similar problem, but with edge-js:

pkg/prelude/bootstrap.js:1102
      throw error;
      ^
 
Error: Module did not self-register.
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at Module.require (pkg/prelude/bootstrap.js:1083:31)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\snapshot\monitor-service\node_modules\edge-js\lib\edge.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1173:22)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at Module.require (pkg/prelude/bootstrap.js:1083:31)
    at require (internal/module.js:11:18)

Versions:

edge-js: v8.1.3
node: v8.2.1
pkg: v4.1.3
pkg-fetch: v2.3.7

Did you solve this issue @igorklopov ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: Module did not self-register - Stack Overflow
Firstly, try npm rebuild . If your C++-add-on-based packages have a build script, it'll do. If it doesn't, you need ...
Read more >
Error:Module did not self-register ---node-addon-examples
It is possible that multiple node / npm versions exist in your system that are causing trouble here.
Read more >
Fix the Module did not self-register error in Node.js - Reactgo
This error occurs when a node_modules folder is corrupted in your project. Due to the network interruption or other reasons like some of...
Read more >
Error: Module did not self-register couchbase - Node.js SDK
First, in node_modules/couchbase/build/Release you should find the built module. Run ldd/otool or like tools to see if there is something it ...
Read more >
Writing Native Node.js Modules - RisingStack Engineering
_makeLong(filename)); ^ Error: Module did not self-register. From now on when you see this error you'll know what to do. Compiling our native...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found