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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -