Once I use the run command while testing my App, it runs fine, debug also shows it seems to be working. Once I change the code and it reloads and I get the following error on Chrome Debug.
plugin_not_installed
For it to keep the plugin loaded or working.
Steps to reproduce:
insert any relevant code between the above and below backticks
import { SQLite, SQLiteObject } from '@ionic-native/sqlite';
class DB {
private db: any = SQLiteObject;
constructor(){
var sqlite = new SQLite();
sqlite.create({
name: 'name.db',
location: 'default'
})
.then((DBO: SQLiteObject) => {
this.db = DBO;
})
.catch(e => console.log(e)); //The plugin_not_installed error comes from here
}
}
export default new DB();
Which @ionic/app-scripts version are you using?
cli packages: (C:\Users\***\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.1
System:
Node : v6.11.3
npm : 5.4.2
OS : Windows 10
Misc:
backend : pro
While it's not showing, SQLlite plugin is also installed and working, since it works the first time.
i have same problem :(
i'm so sorry, work fine after platform ready event!
Look inside your services(@Injectable), they are singleton and start with the application;
I have the same problem, did someone find a solution?
@Kahel3352 The problem happens because Ionic has not yet loaded the SQLite plugin. To control the flow of the application use the "platform.ready ()"
Sorry, I don't understand. What should I do with platform.ready()?
Most helpful comment
i'm so sorry, work fine after platform ready event!