Getting below error while inserting data into the a table in React native Sqlite DB
Possible Unhandled Promise Rejection (id: 0): TypeError: plugin.warn is not a function TypeError: plugin.warn is not a function at SQLitePluginTransaction.addStatement (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:416247:18) at SQLitePluginTransaction.executeSql (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:416228:10) at http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:415677:42 at tryCallTwo (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:27207:7) at doResolve (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:27371:15) at new Promise (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:27230:5) at SQLitePluginTransaction.plugin.. [as executeSql] (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:415656:23) at SQLitePluginTransaction.fn (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:415583:15) at SQLitePluginTransaction.start (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:416184:12) at http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:415866:32
Below is the code to insert data into DB
return new Promise((resolve, reject) => {
db.transaction((trans) => {
trans.executeSql(
sql,
params,
(trans, results) => {
resolve(results);
},
(error) => {
reject(error);
}
);
});
});
}; ```