WebReflection / dblite

sqlite for node.js without gyp problems
MIT License
209 stars 34 forks source link

Error: spawn sqlite3 ENOENT when creating db #44

Closed mrigo closed 7 years ago

mrigo commented 8 years ago

Hi, I've installed dblite on my raspberry pi and when I'm trying to instantiate a db

var dblite = require('dblite');
var db_path = __dirname+'/db/db.sqlite';
db = dblite(db_path, '-header');

and run node app.js, I'm having this error

Error: spawn sqlite3 ENOENT

The db exists and is readable and the path is correct.

On OSX the error doesn't appear.

Thanks! \m

WebReflection commented 8 years ago

do you have sqlite3 installed ?

$ which sqlite3
/usr/bin/sqlite3

if your output is different, please specify the right path for the executable as explained in the Readme.

example

var dblite = require('dblite');
dblite.bin = "/usr/local/bin/sqlite3";

var db_path = __dirname+'/db/db.sqlite';
var db = dblite(db_path, '-header');
WebReflection commented 7 years ago

no reply over almost a year.