A SQLite3 dialect for Knex.js designed specifically for React Native via react-native-sqlite-storage. Version 1.2.1 provides a webpack-built, React Native-friendly version of Knex that avoids direct Node.js dependencies. It ships TypeScript types and requires react-native-sqlite-storage >=5.0.0 <7. Key differentiator: it generates a custom Knex bundle to work around React Native's lack of Node built-ins, unlike alternatives that require manual polyfilling. Active maintenance with monthly releases.
npm install knex-react-native-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a SQLite database instance, creating a table, inserting a row, and querying data.
Ensure react-native-sqlite-storage is installed at version 5.x or 6.x (e.g., npm install react-native-sqlite-storage@5)
Check bundled Knex version; consider alternative if you need Knex v3 features.
Use ES module imports: import { knex, RNSqliteDialect } from 'knex-react-native-sqlite'Refer to react-native-sqlite-storage documentation for valid connection options.
Replace import { knex } from 'knex' with import { knex } from 'knex-react-native-sqlite'Use the imported dialect: client: RNSqliteDialect
Install react-native-sqlite-storage@5 or @6: npm install react-native-sqlite-storage@5
This package is only for React Native; use sqlite3 or better-sqlite3 for Node.js.