Articles on: Troubleshooting

Could not locate the bindings file: fix better-sqlite3

Quick fix: update better-sqlite3 (and libraries that depend on it, like quick.db) to the latest version, delete node_modules and package-lock.json, and restart the application. Full steps below.


What this error means


When your application uses better-sqlite3 (directly, or through a library that depends on it like quick.db), it may fail on startup with an error like this:


Error: Could not locate the bindings file. Tried:
/application/node_modules/better-sqlite3/build/better_sqlite3.node
...


In short: better-sqlite3 couldn't load its native binary (the "bindings"), which almost always means the installed version is too old for the Node.js version running your app.


Why it happens


Older versions of better-sqlite3 don't support the Node.js LTS v24.x line. When the platform runs your application on a newer Node.js, the outdated package can't find a compatible compiled binary and throws this error.


How to fix it


1. Check the latest version of the libraries.


Look up the current versions on npm: better-sqlite3 and, if you use it, quick.db.


2. Update your package.json.


"better-sqlite3": "^12.5.0",
"quick.db": "^9.1.7" // or any other library that depends on better-sqlite3


Or from the terminal: npm install better-sqlite3@latest.


3. Force a clean install.


Delete node_modules, package-lock.json, and the .npm folder so the dependencies are reinstalled from scratch.


4. Restart the application.


Still not starting?


If the app still won't boot after updating, the cause may be elsewhere — review My application won't start: Verifying the start script. If the error mentions a package that can't be found, see MODULE_NOT_FOUND / Cannot find module: how to fix it.


Updated on: 06/13/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!