Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm using node-webkit with an external module called edge.

According to the node-webkit docs modules that contain native code must be recompiled using nw-gyp as oppose to node-gyp. I was able to recompile without error and node-webkit seems to import the module OK.

Heres my code. The code I'm trying to use: var edge = require('edge.node');

var hello = edge.func(function () {/*
async (input) => 
{ 
    return ".NET welcomes " + input.ToString(); 
}
*/});

hello('Node.js', function (error, result) {
if (error) throw error;
console.log(result);
});

Which throws the following error when run within node-webkit.

Uncaught TypeError: Object [object Object] has no method 'func' 

If write the object out to console.log I can 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 perfectly and I can access the 'func' function. This is driving me crazy - and any help would be really appreciated.

share|improve this question
+1 , what you're trying to make sounds very interesting. Edge is extremely experimental technology, you might want to open an issue in their github. – Benjamin Gruenbaum Jun 4 at 14:46
Yeah - already did that. Really need to try and this to work for a show-case app that I'm building. – user1513388 Jun 4 at 16:19

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.