I'm trying to use a native sqlite3 module (
https://github.com/developmentseed/node-sqlite3) in a node-webkit app on windows (x64)
It works fine with the latest version of node but when I try to include it into a node-webkit app ... it doesn't seem to want to load the native module. I've re-compiled the module for win32 and tested it with regular node and it all works fine but when I try to require the module, I get this error
%1 is not a valid Win32 application.
I can download the 32-bit node from
nodejs.org and include the module and it works just fine.
Any ideas on how I could get this to work?
The code is very simple ...
try {
var sqlite3 = require('sqlite3');
var db = new sqlite3.Database(':memory:');
db.serialize(function() {
db.each("SELECT sqlite_version() as version", function(err, row) {
document.body.innerHTML+=row.version;
});
});
db.close();
}
catch(e) {
document.body.innerHTML+=e.message;
}