I\'m working with the new Node.js Tools for Visual Studio and included the sqlite3 npm module. When I call require(\'sqlite3\')
it throws the error:
In case this above has not worked for anyone, here is what worked for me:
sudo apt install node-sqlite3
(I am using Ubuntu with Vscode as editor). It seems installing this node-sqlite3 module was the one that was recognized.
To skip searching for pre-compiled binaries, and force a build from source, use
npm install --build-from-source
It seems this is a problem with the sqlite3
npm package itself. There exists a lib\binding\Release\
folder, but not a lib\binding\Debug\
folder. I just created a copy of the Release
folder, named it Debug
, and all is well.
This is what worked for me: https://www.npmjs.com/package/sqlite3
npm install https://github.com/mapbox/node-sqlite3/tarball/master
I got the kind of problem, my node
version is v10.16.3
This globally installed sqlite3 gives error in loading by require('sqlite3')
It been solved by install a sqlite3 local to project.
$ npm install sqlite3
Note without -g option, it works for me.
use this:-
npm install sqlite3 --build-from-source