Home

Issue: 3053

Is it possible to use better-sqlite3 in a Nuxt.js environment?

[issue link]

Is it possible to use better-sqlite3 in a Nuxt.js environment? Note: npm install --save better-sqlite3

In my nuxt.config.js:

module.export = {
  ...
  build: {
    ...
    vender: [
      ...
      'better-sqlite3'
    ]
  }
  ...
}

results in:

Failed to compile with 2 errors
This dependency was not found:
* fs in ./node_modules/better-sqlite3/lib/util.js, ./node_modules/bindings/bindings.js
To install it, you can run: npm install --save fs

Also https://github.com/JoshuaWise/better-sqlite3/issues/107

Alternatively, is it possible to read and write to an SQLite database file with Nuxt in general?

This question is available on Nuxt.js community (#c2644)