Cannot call method 'executeSQL' of undefined

Hi all,
I use SQLite for store some informations and use them. Then i declare an SQLiteObject as class value, i create my database if not exist and i insert my value into my table. I execute my query with the executeSQL method of my SQLiteObject but ionic say " method undefined and don’t know why.
There is a part of my code :

import { SQLite, SQLiteObject } from '@ionic-native/sqlite';

@IonicPage({ name: "main", segment: "app"} )
@Component({
  selector: 'page-accueil',
  templateUrl: 'accueil.html',
})
export class AccueilPage {
  historique: any[];
  private valHistorique: string[] = [];

  private db: SQLiteObject;

  constructor(private sqlite: SQLite) {}
  
  private initHistorique()
  {
    // Create database if not exist
    console.log(this.db);
    this.sqlite.create({
      name: 'data.db',
      location: 'default'
      })
        .then((db: SQLiteObject) => {
          console.log("db created !");
          this.db = db;
          this.db.executeSql('CREATE TABLE IF NOT EXISTS `HISTORIQUE_ACCUEIL` (`idAnnonces` INTEGER NOT NULL)', {})
            .then(() => console.log('Table historique created'))
            .catch(e => console.log(e));
      })
      .catch(e => console.log(e));
  }
[...]

Any ideas ?

Are you running in browser? Or with the live-reload option?

It was live-repload option !

Yeah, see here: https://github.com/ionic-team/ionic/issues/13737

Ty for reply but i’m actualy not anymore on this project, it was 3 month ago and i can’t test it :slight_smile: