Unable to load neon-bindings compiled node module on Windows NWJS/Electron

I have run into a problem where I cannot get the node module to load in either Electron or NWJS. Both of those are giving me the same error:

(unknown) Uncaught Error: Module did not self-register.
    at Object.Module._extensions..node (module.js:695:18)
    at Module.load (module.js:569:32)
    at tryModuleLoad (module.js:532:12)
    at Function.Module._load (module.js:524:3)
    at Module.require (module.js:592:17)
    at require (internal/module.js:11:18)
    at self.require (<anonymous>:11:26)

The problem only arises when I try to load the module on Windows in Electron or NWJS. If I require the module in a simple js file and then run using node, it works completely fine. I did not have this problem on Linux/Ubuntu and I cannot find any reference regarding this on neon but there are some instances of this error elsewhere if I google this.

Has anybody else run into this problem? Would greatly appreciate any help.

Issue created.

1 Like

Did you ever figure this out? Moving to a Linux dev environment for my project is not something that will work atm.

If you look at the end of the linked Github issue thread, you will find something that looks like a solution or workaround.

Disclaimer: I did not try this, nor did I ever write any Electron-based code for that matter.