Runtime error can't resolve all parameters for storage: (?)


#1

I am trying to use the local storage in my project.
I am getting the error while running the project.I am new to Ionic ,so please help me out.


#2

Did you followed the Storage guide here: https://ionicframework.com/docs/storage/

Maybe you forgot the import the StorageModule in your app.module.ts


#3

What is this?
Ionic Storage?
Browser local storage?


#4

I have imported the Storage Module in app.module.ts

Actually there was version problem:
I changed my version to 1.1.6:
but now I am getting the following error:
Please help me with this,
Thanks


#5

You didn’t import the StorageModule. Please read the Docs first

import { IonicStorageModule } from '@ionic/storage';

@NgModule({
  declarations: [
    // ...
  ],
  imports: [
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    // ...
  ],
  providers: []
})
export class AppModule { }

#6

Browser Local Storage,which is local provider I created by the command

ionic g provider localprovider

Thank-you


#7

I used
import{ Storage}from ‘@ionic/storage’;
Is this wrong…


#8

I posted the example from the docs. You have to import the StorageModule first in your app.module.ts before you can use the Storage anywhere else in your application.


#9

I got my mistake,actually i have not included HttpModule in the imports.
Thanks for your help
vithika


#10

Could you share your screen shots for future references(app.module.ts)