ionic-cache icon indicating copy to clipboard operation
ionic-cache copied to clipboard

Cache initialization error: Error: No available storage method found.

Open mumairofficial opened this issue 3 years ago • 6 comments

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.

image

mumairofficial avatar Jan 08 '22 07:01 mumairofficial

Same issue here

rickgrana avatar Apr 25 '22 04:04 rickgrana

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 avatar Apr 25 '22 07:04 WillPoulson

@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.

mumairofficial avatar Apr 26 '22 12:04 mumairofficial

@WillPoulson I am using the version 3.0.6

ricardograna avatar Apr 26 '22 13:04 ricardograna

I've the same problem

Angular v14 @angular/core:^14.1.1 @ionic/storage-angular: ^3.0.6 "ionic-cache": "^6.0.3"

nicopenaloza avatar Aug 06 '22 15:08 nicopenaloza

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]
        })
    })

nicopenaloza avatar Aug 06 '22 15:08 nicopenaloza