IonicStorage with Angular 10

Someone have fixed ModuleWithProviders issue after Angular 10 update ?
I’ve this err:

[ng] ERROR in node_modules/@ionic/storage/index.d.ts:5:52 - error TS2314: Generic type ‘ModuleWithProviders’ requires 1 type argument(s).
[ng] 5 static forRoot(storageConfig?: StorageConfig): ModuleWithProviders;

Thanks

I’m on Angular 10 and i don’t have this Error :thinking:

This my code:

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot(),
    IonicStorageModule.forRoot({
      name: '__mydb',
      storeName: '_settings',
      driverOrder: ['sqlite', 'websql', 'indexeddb']
    }),

Your?

i just import the IonicStorageModule like:

IonicStorageModule.forRoot()

but i don’t think this is the problem.

Another hint: The entryComponents can be removed since Angular 9

Just tested things out and was unable to replicate the error. If you could isolate it in a small example, that would be great.

I’ve difficult to isolate in a small example, can i send you access to my code on github? (np. for me)

Hi Mike, i see you Closed #187 via #191
Are you releasing a new ionic-storage version ?

Was working on it.

2.3.0 is out which includes that fix

2 Likes