Reputation: 177
Every time I try to run my Ionic app, it is unable to load native plugins like the Cordova SQLite plugin and the Splash Screen plugin.
This happens at this line of code:
this.dbLocal.executeSql('CREATE TABLE IF NOT EXISTS contacts(id INTEGER
PRIMARY KEY AUTOINCREMENT, nickname TEXT, firstName TEXT, lastName TEXT,
description TEXT)', {}).then(console.log('Contacts loaded'));
I get the following error:
Error: Uncaught (in promise): plugin_not_installed
I also notice in the console logs that it is unable to find the native SQLITE plugin despite it being installed in the Ionic project. I tried uninstalling and reinstalling it, as well as doing:
ionic cordova prepare
But it still does not work. I am not sure how to resolve this issue. Currently we are using:
Upvotes: 0
Views: 288
Reputation: 133
I also had same problem. I removed the error by correcting my SQL query. Crosscheck your queries.
Upvotes: 0
Reputation: 1390
Looks like you are testing on a browser and sql native plugin is not available at a browser, thats why you get this reason.
You need to test on a real mobile, there it'll work without any problems.
Upvotes: 1