I'm trying to use the nodejs 'edge' module from within my node-webkit application. e.g.
var edge = require('../node_modules/edge')
var helloWorld = edge.func('async (input) => { return ".NET Welcomes " + input.ToString(); }');
helloWorld('JavaScript', function (error, result) {
if (error) throw error;
console.log(result);
});
However, whenever I call it I get the following error:-
Uncaught Error: %1 is not a valid Win32 application.
C:\data\node_modules\edge\lib\native\win32\ia32\0.10.0\edge.node
If I run the same code outside of node-webkit using nodejs it works OK -
This also works OK from within NW:
var dns = require('../node_modules/native-dns')
var question = dns.Question({
name: 'www.google.com',
type: 'A'
});
var req = dns.Request({
question: question,
server: { address: '8.8.8.8', port: 53, type: 'udp' },
timeout: 1000
});
req.on('timeout', function () {
console.log('Timeout in making request');
});
req.on('message', function (err, answer) {
answer.answer.forEach(function (a) {
console.log(a.address);
});
});
req.on('end', function () {
console.log('Finished processing request');
});
req.send();
Any guidance would be appreciated!