Tuesday, 24 September 2019

Install SQlite for Ionic4 Vue

I'm trying to add SQlite to my ionic4 project, but get installation errors.

My NPM install was this:

    ionic cordova plugin add cordova-sqlite-storage
    npm install @ionic-native/sqlite

    //ionic plugin add cordova-sqlite-storage ==> this one makes error

In main.js, I tried each of the following:

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

Here are the errors: a) npm warning, b) console error, and c) Chrome inspector for main.js ionic native sqlite webpack is not constructor

And here's the code from main.js (last line is where everything fails).

    new Vue({
      el: '#app',
      router,
      template: '<App/>',
      components: { App },
      render : (h) => h(App),
      mounted() {

        this.storage = new SQLite();



from Install SQlite for Ionic4 Vue

No comments:

Post a Comment