sqlite-mobile is a lightweight, TypeScript-first SQLite client optimized for mobile and edge environments. Version 0.1.4 is the current stable release, with irregular cadence. It provides a simple async API over SQLite, focusing on minimal dependencies and cross-platform compatibility (Node.js, React Native, Bun). Unlike better-sqlite3, it is designed for mobile runtimes and supports synchronous and asynchronous operations.
npm install sqlite-mobileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Opens an in-memory database, creates a table, inserts a row, queries all rows, and logs the result.
Use async/await or .then() for all database operations.
Replace `db.close()` with `db.dispose()`.
Call `stmt.finalize()` after done with a statement, or use `db.prepareAndRun()` for one-offs.
Use import syntax or switch to dynamic import().
Ensure you have the correct native SQLite library configured for your environment.
Install better-sqlite3: npm install better-sqlite3
Use await db.all(...) or ensure using async-compatible version.
Use import { Database } from 'sqlite-mobile' or add type: module to package.json.