I am trying to connect Electron desktop app to Sqlite Database via knex.js
import { boot } from 'quasar/wrappers'
const knex = require('knex')({
client: 'sqlite3',
connection: {
filename: 'src/db/sample.db'
}
});
export default boot(async ({ app } ) => {
app.config.globalProperties.$knex = knex
})
export { knex }
But, there is multiple errors on compiling like below
App • ERROR • UI in ./node_modules/knex/lib/builder-interface-augmenter.js
Module not found: Can't resolve imported dependency "util"
Did you forget to install it? You can run: npm install --save util
- Quasar v2.0.0
- Knex.js v0.95.15
- Vue 3
- sqlite3 v5.0.2