node.js - using sqlite3 at child process issue -
node-webkit : 0.12.3 ide : webstorm 10 pc : win7 64bit
childprocess.js
var file = "./test.db"; var sql = require('../module/sqlite3').verbose(); // child process crash here var db = new sql.database(file); db.close();
i don't understand happens?
others node-webkit can't find node_sqlite3.node path.
i copied "node_sqlite3.node"
"node-webkit-v0.12.3-win32-x64" "node-v46-win32-x64".
but still not work. wrong?
well sqlite3 has native codes in need compile before using it. follow steps.
$ npm install node-pre-gyp
cd in node_modules/sqlite3 then
$ node-pre-gyp build --runtime=node-webkit --target=x.xx.x (your version)
i.e copying .node file won't work
Comments
Post a Comment