I am using node -webkit with an external module called edge .
According to the document modules node -webkit, which contain their own code, must be recompiled with nw-gyp as opposed to node-gyp . I was able to recompile without errors and node -webkit seems to import the module in order.
Here is my code. The code I'm trying to use is:
var edge = require('edge.node'); var hello = edge.func(function () {}); hello('Node.js', function (error, result) { if (error) throw error; console.log(result); });
Which causes the following error when starting in node -webkit.
Uncaught TypeError: Object [object Object] has no method 'func'
If I write the object to console.log , I see:
Object {initializeClrFunc: function} initializeClrFunc: function () { [native code] } __proto__: Object
So the module seems to have loaded. If I run the same code outside of node -webkit, everything works fine, and I can access the func function. It drives me crazy - and any help would really be appreciated.
source share