Cannot resolve all parameters for 'Storage'(?, ?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'Storage' is decorated with Injectable

`import {Storage,SqlStorage} from 'ionic-angular';
import {Injectable} from 'angular2/core';
import {Contact} from '../modules/Contact';

export class DataService{
  private data:Array<Contact>;
  private storage:Storage;
  constructor(){ Storage(SqlStorage,{name:'contact-app'});;'contact-app').then((contacts)=>{;
      let newData=JSON.stringify(item);'contact-app',newData);
      let newData=JSON.stringify(;'contact-app',newData);


app.bundle.js:17029Uncaught TypeError: Cannot read property ‘getOptional’ of undefined
exports.PlatformRef_ = PlatformRef_;
function _runAppInitializers(injector) {
var inits = injector.getOptional(application_tokens_1.APP_INITIALIZER);


I’ve the same issue. Did you solve it already?

This is my code:

import ‘es6-shim’;
import {App, Platform, Storage, SqlStorage} from ‘ionic-angular’;
import {StatusBar} from ‘ionic-native’;
import {TabsPage} from ‘./pages/tabs/tabs’;

providers: [Storage],
template: ‘<ion-nav [root]=“rootPage”>’,
config: {
tabbarPlacement: ‘top’
export class MyApp {
static get parameters() {
return [[Platform]];

constructor(platform) {
this.rootPage = TabsPage;

platform.ready().then(() => {
  // Okay, so the platform is ready and our plugins are available.
  // Here you can do any higher level native things you might need.
  StatusBar.styleDefault(); = new Storage(SqlStorage, null);"CREATE TABLE IF NOT EXIST people (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT)").then((data) => {
      console.log("TABLE CREATED -> " + JSON.stringify(data.res));
  }, (error) => {
      console.log("ERROR -> " + JSON.stringify(error.err));


I have the same problem here did any body found a solution

I just downgraded storage to 1.1.6 in package.json manually

@ionic/storage”: “1.1.6”,

and then ran npm install. That fixed it for me

1 Like

@nishantpant it works for me.
something got wrong with “^1.1.6”

This has seemingly been fixed:

1 Like

I don’t think I’d say it’s been “fixed” as much as it is that one must now use the bootstrap method in the stanza you linked, and not the one further up the page under “Usage”.

@nishantpant : Thank you. It worked. I changed from “@ionic/storage”: “2.0.0”, to “@ionic/storage”: “1.1.6”, and ran npm install.

To others stumbling across this thread: there are ways to make ionic-storage 2.0.0 work. You are probably still declaring Storage in a provider array somewhere. Take them all out. Don’t downgrade to 1.1.6.

@rapropos : I’m also facing same issue. I know downgrade is not a right solution. As per your logic if I remove Storage from Provides array then while building it is asking for Storage provide missing. Can you please explain exactly what changes need to be done, so that it will be helpful for others too.

Hi all I have fixed issue by referring this link. Please refer link in which import @ionic/storage as IonicStorageModule and remove Storage from Providers array then it will start working. Downgrading is not a right option. This fix is for version 2.0.0.


The solution outlined here fixes this problem:

Update Steps:

  • Run npm install @ionic/storage@2.0.0 --save --save-exact
  • Remove Storage from your providers in app.module.ts
  • import { IonicStorageModule } from ‘@ionic/storage’ instead of import { IonicStorage } from ‘@ionic/storage’ in app.module.ts
  • Add IonicStorageModule.forRoot() to the imports array in app.module.ts

Yup. If you’re upgrading to Ionic 2.2.0 and above, I’d suggest reading the update guide: