I have been running into this issue for weeks. I have installed expo-sqlite
into my React Native app, but can not use it without constantly running into blockers. Currently it believes that I cannot use either of these methods despite declaring on line 1 import * as SQLite from "expo-sqlite";
db.transaction
as Property 'transaction' does not exist on type 'SQLiteDatabase'
db = SQLite.openDatabase("tasks.db")
as Property 'openDatabase' does not exist on type ...node_modules/expo-sqlite/build/index")'. Did you mean 'openDatabaseSync'?
I think I can get around the issue of the .openDatabase by using a constructor as below, but it still prevents me from calling db.transaction
:
db;
constructor(db: SQLite.SQLiteDatabase) {
this.db = db;
}
I am running "expo": "^51.0.0"
and "expo-sqlite": "~14.0.3"
I have tried using both newer and older versions of expo-sqlite
in my project, but no luck.
Leah Eyestone is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.