When does it occur?
This issue happens when thebetter-sqlite3
library or a library that depends on it, like quick.db
, is not updated.
Why does it occur?
This error occurs because thebetter-sqlite3
library has not been updated to the latest version. In better-sqlite3
11.x.x and earlier, the library was not support Node.js LTS v22.x.x.
How to fix
To fix this issue, you need to update thebetter-sqlite3
library to the latest version. Remember to update libraries that depend on better-sqlite3
, like quick.db
.
Check the latest versions of the libraries:
Update the better-sqlite3
in your package.json
After checking the latest version of the library, you can update it in your package.json
. For example, if the current version is 11.10.0, you can use the following:
Update manually in your package.json
Update using the terminal
Removing files for a clean installation
After updating yourpackage.json
, you should remove the files and folders: node_modules
, package-lock.json
, and the .npm
folder.