Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
node searching in 'node-v11-darwin-x64', fails to find 'node_sqlite3.node' #228
> var sqlite3 = require('sqlite3'); Error: Cannot find module './binding/Release/node-v11-darwin-x64/node_sqlite3.node' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/Users/diminoten/tmp/node_modules/node-sqlite3/lib/sqlite3.js:7:15) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)
I'm not entirely sure I'm doing this the way it's intended, was hoping to get some guidance. I do need to build it myself from source, though, and not pull it from github or npm.
This worked in <=v2.1.15. Only noticed it when I tried to upgrade today.
This issue is still occurring for me using OS X Yosemite with Node 0.11.14 and sqlite3 1.0.8
It places the binary into:
When copying the binary to the location it is being looked for in, I then get this error:
If somebody could look into this or point me in the right direction to resolving it myself, that would be awesome and much appreciated. We have a lot of code written to use this implementation so it'd be far from ideal to have to switch db implementations. (We had been using node 0.10.36 before which worked fine, but being forced to upgrade to 0.11.14 to use self signed certificates called for a new build against 0.11.14, which has resulted in the broken sqlite3). Thank you.
@mattfrey - this is a very old issue. Copying is NOT recommended and the error you are seeing is because copying is not going to work. As far as your overall issue:
If you do the two above things and still hit a problem after a fresh install please create a new issue and don't comment on this old issue since its unlikely I will see it.