Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mumairofficial opened this issue Jan 8, 2022 · 6 comments

Comments

@mumairofficial
Copy link

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

@rickgrana
Copy link

Same issue here

@WillPoulson
Copy link
Collaborator

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?

@mumairofficial
Copy link
Author

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

@ricardograna
Copy link

@WillPoulson I am using the version 3.0.6

@nicopenaloza
Copy link

nicopenaloza commented Aug 6, 2022

I've the same problem

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

@nicopenaloza
Copy link

nicopenaloza commented Aug 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants