platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
this.storage = new Storage(SqlStorage, null);
this.storage.query("CREATE TABLE IF NOT EXIST people (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT)").then((data) => {
console.log("TABLE CREATED -> " + JSON.stringify(data.res));
}, (error) => {
console.log("ERROR -> " + JSON.stringify(error.err));
})
});
I donāt think Iād say itās been āfixedā as much as it is that one must now use the bootstrap method in the stanza you linked, and not the one further up the page under āUsageā.
To others stumbling across this thread: there are ways to make ionic-storage 2.0.0 work. You are probably still declaring Storage in a provider array somewhere. Take them all out. Donāt downgrade to 1.1.6.
@rapropos : Iām also facing same issue. I know downgrade is not a right solution. As per your logic if I remove Storage from Provides array then while building it is asking for Storage provide missing. Can you please explain exactly what changes need to be done, so that it will be helpful for others too.
Hi all I have fixed issue by referring this link. Please refer link in which import @ionic/storage as IonicStorageModule and remove Storage from Providers array then it will start working. Downgrading is not a right option. This fix is for version 2.0.0.