SQLite is not working in ionic v4

I am trying to create a simple ionic v4 project with SQLite plugin to create database and insert values then select these values and display them in the application. I’ve followed the documentation sample code and it didn’t work for me and also I’ve followed multiple tutorials available in the internet but nothing is working also. I’ve tested my code on both android device (actual) and in the browser.

$ ionic cordova plugin add cordova-sqlite-storage
$ npm install @ionic-native/sqlite
import { Component } from '@angular/core';
import { ToastController, Platform } from '@ionic/angular';
import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {

  private db: SQLiteObject;
  public movies: string[] = [];
  public message:any;

  constructor(private toastController: ToastController, private sqlite: SQLite, platform: Platform) {
    platform.ready().then(() => {
      this.CreateDatabase();
    });
  }

  CreateDatabase()
  {
    try
    {

      this.sqlite.create({
        name: 'data.db',
        location: 'default'
      })
        .then((db: SQLiteObject) => {

          db.executeSql('create table IF NOT EXISTS Movies(id INTEGER PRIMARY KEY, name VARCHAR(32))', [])
          .then(() => {
            console.log('Table Movies created !');
            this.db.executeSql('INSERT INTO `Movies` VALUES (`1`, `James Bond 007`)', [])
            .then(() => console.log('Executed SQL'))
            .catch(e => this.message = e);

        })
        .catch(e => this.message = e);


        })
        .catch(e => this.message = e);
    }
    catch(err)
    {
      this.presentToast(err);
    }

  }

  public retrieveFilms() {

    try 
    {
      this.db.executeSql('SELECT name FROM `Movies`', [])
      .then((data) => {
        if(data == null) {
          return;
        }

        if(data.rows) {
          if(data.rows.length > 0) {
            for(var i = 0; i < data.rows.length; i++) {
              this.movies.push(data.rows.item(i).name);
            }
          }
        }

      }).catch(e => this.presentToast(JSON.stringify(e)));
    }
    catch(err)
    {
      this.presentToast(err);
    }

  }

  async presentToast(messageText) {
    const toast = await this.toastController.create({
      message: messageText,
      duration: 2000
    });
    toast.present();
  }

}

this code will present two errors
1- TypeError: Cannot read property ‘then’ of undefined.
2- TypeError: Cannot read property ‘executeSql’ of undefined.

I’m getting the same error I try to code to solve problem but thing helpful