grumdrig / node-sqlite Goto Github PK
View Code? Open in Web Editor NEWSQLite bindings for Node.js
Home Page: http://grumdrig.github.com/node-sqlite/
SQLite bindings for Node.js
Home Page: http://grumdrig.github.com/node-sqlite/
Tried loading sqlite3 via the shell, is there something that i have missed.
Installed sqlite3 via npm (not global):
kurt-camphers-MacBook-Pro:node_campfire kurtcampher$ node
var sql = require('sqlite3');
Error: Unable to load shared library /Users/kurtcampher/Projects/personal/node/node_campfire/node_modules/sqlite3/lib/sqlite3_bindings.node
at Object..node (module.js:472:11)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (/Users/kurtcampher/Projects/personal/node/node_campfire/node_modules/sqlite3/lib/sqlite3.js:1:104)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
Hi
I tried to build this module today and got this error:
rickard@mirkkhaxx:~/src/node-sqlite$ node-waf build Waf: Entering directory `/home/rickard/src/node-sqlite/build' [1/2] cxx: sqlite3_bindings.cc -> build/default/sqlite3_bindings_1.o ../sqlite3_bindings.cc: In static member function âstatic int Sqlite3Db::CommitHook(void*)â: ../sqlite3_bindings.cc:145: error: no matching function for call to âSqlite3Db::Emit(const char [7], int, NULL)â /usr/include/node/node_events.h:15: note: candidates are: bool node::EventEmitter::Emit(v8::Handle, int, v8::Handle*) ../sqlite3_bindings.cc: In static member function âstatic void Sqlite3Db::RollbackHook(void*)â: ../sqlite3_bindings.cc:153: error: no matching function for call to âSqlite3Db::Emit(const char [9], int, NULL)â /usr/include/node/node_events.h:15: note: candidates are: bool node::EventEmitter::Emit(v8::Handle, int, v8::Handle*) ../sqlite3_bindings.cc: In static member function âstatic void Sqlite3Db::UpdateHook(void*, int, const char*, const char*, sqlite_int64)â: ../sqlite3_bindings.cc:162: error: no matching function for call to âSqlite3Db::Emit(const char [7], int, v8::Local [4])â /usr/include/node/node_events.h:15: note: candidates are: bool node::EventEmitter::Emit(v8::Handle, int, v8::Handle*) Waf: Leaving directory `/home/rickard/src/node-sqlite/build' Build failed: -> task failed (err #1): {task: cxx sqlite3_bindings.cc -> sqlite3_bindings_1.o}
I'm running version 3.7.3 of sqlite on debian 6.0/squeeze:
rickard@mirkkhaxx:~/src/node-sqlite$ dpkg -l | grep sqlite3 ii libdbd-sqlite3-perl 1.29-3 Perl DBI driver with a self-contained RDBMS ii libsqlite3-0 3.7.3-1 SQLite 3 shared library ii libsqlite3-dev 3.7.3-1 SQLite 3 development files ii sqlite3 3.7.3-1 A command line interface for SQLite 3
Obviously since 0.6 doesn't work yet it's unlikely to work but I did notice that the first failure is due to package.json missing in the repo. This didn't quite make sense to me. Why is there no package.json at all?
I am using Ubuntu 11.10 , node-waf configure has no issue but build throws this error
Waf: Entering directory /home/anand/Downloads/node-sqlite/build' [1/2] cxx: sqlite3_bindings.cc -> build/Release/sqlite3_bindings_1.o ../sqlite3_bindings.cc:19:25: fatal error: node_events.h: No such file or directory compilation terminated. Waf: Leaving directory
/home/anand/Downloads/node-sqlite/build'
Build failed: -> task failed (err #1):
{task: cxx sqlite3_bindings.cc -> sqlite3_bindings_1.o}
Hi,
When I try to build under the latest and greatest version of node.js, here's what happens when I run the tests:
dmuth@ip-10-245-23-31:~/tmp/grumdig/node-sqlite (master) $ node test.js
The "sys" module is now called "util". It should have a similar interface.
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library /home/dmuth/tmp/grumdig/node-sqlite/build/default/sqlite3_bindings.node
at Object..node (module.js:472:11)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.<anonymous> (/home/dmuth/tmp/grumdig/node-sqlite/sqlite.js:26:16)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
I've verified that the file is in fact there:
dmuth@ip-10-245-23-31:~/tmp/grumdig/node-sqlite (master) $ ls -l build/default/sqlite3_bindings.node
-rwxrwxr-x 1 dmuth dmuth 134201 2012-02-10 16:30 build/default/sqlite3_bindings.node
Any suggestions?
Thanks,
-- Doug
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.