Error: Can't resolve all parameters for HomePage (NativeStorage)

Hi and thank you very much to all of you!

I’m having the followin error: Error: Uncaught (in promise): Error: Can’t resolve all parameters for HomePage: (?).

I installed the NativeStorage plugin with:

  • ionic cordova plugin add cordova-plugin-nativestorage
  • npm install @ionic-native/native-storage

Then I open the app.module.ts and it 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 { SplashScreen } from ‘@ionic-native/splash-screen/ngx’;
import { StatusBar } from ‘@ionic-native/status-bar/ngx’;
import { AppComponent } from ‘./app.component’;
import { AppRoutingModule } from ‘./app-routing.module’;
import { NativeStorage } from ‘@ionic-native/native-storage/ngx’;

declarations: [AppComponent],
entryComponents: ,
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
providers: [
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
bootstrap: [AppComponent]

export class AppModule {}

And my homepage it’s like this:

import { Component, OnInit } from ‘@angular/core’;
import { NativeStorage } from ‘@ionic-native/native-storage/ngx’;

selector: ‘app-home’,
templateUrl: ‘’,
styleUrls: [‘’],

export class HomePage implements OnInit {

constructor(public nativeStorage: NativeStorage) {}

ngOnInit() {

But I’m getting the same error!!!

Any thoughts?

Thanks in advance

i don’t understand the error either. Why so you use this Plugin and not the official Ionic Storage?

It’s working now… I didn’t restart the ionic serve after adding the plugin…