ionic-cache
ionic-cache copied to clipboard
Cache initialization error: Error: No available storage method found.
I freshly installed ionic-cache by following the instructions to cache request and I get this error not sure what I am doing wrong.
My environment: Ionic version 6 Angular 12
I am using lazy loading also.

Same issue here
This looks like an issue with @ionic/storage-angular rather than ionic-cache.
The first returned error is coming from their package rather than ours, it's the result of calling this.storage.create();
Which version of @ionic/stoage-angular have you been trying this with?
@WillPoulson this ticket is quite old I do not remember the version but I do try a couple of solutions from google but after no success and some more limitations, I ended up translating the whole project to Flutter.
@WillPoulson I am using the version 3.0.6
I've the same problem
Angular v14
@angular/core:^14.1.1
@ionic/storage-angular: ^3.0.6
"ionic-cache": "^6.0.3"
I've the same problem
Angular v14
@angular/core:^14.1.1@ionic/storage-angular: ^3.0.6"ionic-cache": "^6.0.3"
I just fixed it in my project including this on app.module.ts
import { IonicStorageModule } from '@ionic/storage-angular';
import { Drivers } from '@ionic/storage';
@NgModule({
....
imports: [
...,
IonicStorageModule.forRoot({
driverOrder: [Drivers.LocalStorage]
})
})