Issue
i want to do it like the offical documentation from ionic storage. but it says that "index.d.ts(9, 9): This likely means that the library (@ionic/storage-angular) which declares IonicStorageModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy."
how can i get rid of this error?
my code looks app.module.ts looks like this:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { IonicStorageModule } from '@ionic/storage-angular';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, IonicStorageModule.forRoot()],
providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy}],
bootstrap: [AppComponent],
})
export class AppModule {}
Solution
It seems to be a bug in the current @ionic/storage-angular package
see https://github.com/ionic-team/ionic-storage/issues/293 for more info.
Quick fix :
npm install @ionic/[email protected]
Answered By - Benjamin Simon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.