I am trying to run something like:
var x = require(‘sqlite3’)
but I always get the error:
‘Script Error: Error: The file “sqlite3” couldn’t be opened because there is no such file.’
I have tried installing the module globally using:
npm install -g ‘sqlite3’
which works and (on my MacBook) installs it in /usr/local/lib/node_modules, but still gives the error.
Where am I going wrong?