Error: No provider for Storage

So I wanted to use a provider for saving my data in the application. It looks like this:

import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage'

export class Data {

  constructor(public http: Http, public storage: Storage) {
    console.log('Hello DataProvider Provider');

  getData() {

  save(todolistEntries) {
    let newTodolistEntries = JSON.stringify(todolistEntries);'todolistEntries', newTodolistEntries);


I’ve imported it into app.module.ts:

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


providers: [
        { provide: ErrorHandler, useClass: IonicErrorHandler },

and injected it into my file:

import { Data } from '../../providers/data/data'

But as soon as i am setting that provider up like this:

 constructor(public navCtrl: NavController, public navParams: NavParams, public modalCtrl: ModalController, public dataService: Data) {}

i am getting a error message:

Uncaught (in promise): Error: No provider for Storage! Error: No provider for Storage! at injectionError (http://localhost:8100/build/vendor.js:1590:86) at noProviderError

Any ideas whats wrong?

Do you have IonicStorageModule.forRoot() in the imports array in app.module.ts?


Gosh. Sorry for wasting your time!
Thank you so much!


i have error as same like this? can you tell me the solution please.

In the app.module.ts replaces IonicStorageModule by IonicStorageModule.forRoot()

i did that but same error any solution?

for me too, its defined in app.module for root, and still get this error