title: Error: Uncaught (in promise): TypeError: Cannot read property 'split' of undefined -> while creating local DB Using ionic sqlite
body: <p>It is throwing error at line  <code>this.sqlite.create</code> saying</p>
  
  <blockquote>
  <pre><code>ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'split' of undefined
  TypeError: Cannot read property 'split' of undefined
  at get (vendor.js:61414)
  at getPlugin (vendor.js:61446)
  at checkAvailability (vendor.js:74896)
  at vendor.js:78283
  at SQLite.create (vendor.js:78288)
  at new DatabaseProvider (main.js:80)
  at _createClass (vendor.js:11620)
  at _createProviderInstance$1 (vendor.js:11592)
  at resolveNgModuleDep (vendor.js:11577)
  at NgModuleRef_.get (vendor.js:12814)
  at c (polyfills.js:3)
  at c (polyfills.js:3)
  at polyfills.js:3
  </code></pre>
  </blockquote>
  
  <pre><code>import { HttpClientModule } from '@angular/common/http';
  import { Injectable } from '@angular/core';
  import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';
  
  @Injectable()
  export class DatabaseProvider {
  
    private db: SQLiteObject;
    private isOpen: boolean;
  
  
    constructor(
      private http: HttpClientModule,
      private sqlite: SQLite,
  
    ) {
        this.sqlite.create({
          name:'data.db',
          location:'default'
        })
        .then((db: SQLiteObject) =&gt; {     
          this.db = db;
          db.executeSql("CREATE TABLE IF NOT EXISTS ticketdetails (id INTEGER PRIMARY KEY AUTOINCREMENT, movie text, showtime TEXT)", []);
          this.isOpen = true;      
        }).catch((error) =&gt; {
          console.log(error);
        })
      }
  
  
    insertTicketDetails(from: string, to:string, fare:number,route_number:String){
      return new Promise ((resolve, reject) =&gt; {
        let sql = "INSERT INTO ticketdetails (movie,showtime) VALUES (?,?)";
        this.db.executeSql(sql, [`enter code here`movie,showtime]).then((data) =&gt;{
          resolve(data);
        }, (error) =&gt; {
          reject(error);
        });
      });
    }
  
  
  }
  </code></pre>