2
votes

i have a code for tracking mouse movement using robotjs running fine on node but when i use the same code in node web kit it gives me "module did not self-register " . Does there any proper solution for this problem that could work for me?

I have reinstalled the node webkit with the target node.js version 0.12 and it still showing me error when I write this line "var robot = require("robotjs")"

it shows error on webkit console :-

Error message: "Module did not self-register."stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }proto: d ""

2

2 Answers

1
votes

okay, fine i got the solution

you need to go in the node_module/robotjs and configure the nw-gyp target by following command

nw-gyp configure --target=0.12.3 then nw-gyp build

and this worked for me (if you get nw-gyp command not found then use npm install nw-gyp )

Thanks

0
votes

It means it's built for the wrong version of node. Did you perhaps install it while running 10 then switch to 12?