SQLite database already open: data.db

Thanks. Upgraded to 2.0.3, and it has the same build error:

ERROR in ./app/pages/chats/SqlDatabase.ts
(26,9): error TS2322: Type 'Promise<SqlResultSet>' is not assignable to type 'Promise<SqlDatabase>'.
  Type 'SqlResultSet' is not assignable to type 'SqlDatabase'.
    Property '_db' is missing in type 'SqlResultSet'.

E:\Development\IDE\ionic-apps\theWhoZoo>tsc -v
Version 2.0.3

Got it working. Thanks.

If I define dbPromise as Promise<any> it now compiles.

let dbPromise: Promise<any> = ...

I appreciate the help

Yep that’ll do. Still not sure why you got that typescript error and I don’t, but whatever.

1 Like