# Trying to use IonicStorageModule, not resolving methods

**URL:** <https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520>\
**Category:** ionic-v3\
**Created:** [March 10, 2017, 8:30pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520 "2017-03-10T20:30:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidgeller](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/davidgeller/32/105167_2.png) [@davidgeller](https://forum.ionicframework.com/u/davidgeller)\
**Post date:** [March 10, 2017, 8:30pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520/1 "2017-03-10T20:30:25Z")

</div>

I just updated to latest Ionic 2.2.0 and local Storage stopped working - so I’m attempting to move everything to using IonicStorageModule. I have followed the instructions at [https://github.com/driftyco/ionic-storage/releases/tag/v2.0.0](https://github.com/driftyco/ionic-storage/releases/tag/v2.0.0) but the methods get, set, remove, etc. are all reporting that they don’t exist.

In my modules I do stuff like:

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

constructor(public navCtrl: NavController, 
              public local_storage: IonicStorageModule) {}

someCode () {
   this.local_storage.set('login_user', email).then(() => {...
}

```

The errors I see are similar to:

```
[12:22:16] typescript: src/pages/login/login.ts, line: 251 
            Property 'set' does not exist on type 'IonicStorageModule'. 

```

Any recommendations? Thanks in advance.

Cordova CLI: 6.4.0  
Ionic Framework Version: 2.2.0  
Ionic CLI Version: 2.2.1  
Ionic App Lib Version: 2.2.0  
Ionic App Scripts Version: 1.1.4  
ios-deploy version: 1.9.0  
ios-sim version: 5.0.11  
OS: macOS Sierra  
Node Version: v6.9.3

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 10, 2017, 8:47pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520/2 "2017-03-10T20:47:41Z")

</div>

`IonicStorageModule` is only for importing into your app module. When using it, one just injects the `Storage` provider, not the module.

---

<div class="post-metadata">

**Author:** ![davidgeller](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/davidgeller/32/105167_2.png) [@davidgeller](https://forum.ionicframework.com/u/davidgeller)\
**Post date:** [March 10, 2017, 10:46pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520/3 "2017-03-10T22:46:22Z")

</div>

Thanks. I was there originally. Went back to that - and now I’m seeing:

`Can't resolve all parameters for Storage: (?).`

The stack looks like:

```
Error: Can't resolve all parameters for Storage: (?).
    at v (http://localhost:8100/build/polyfills.js:3:4864)
    at SyntaxError.BaseError [as constructor] (http://localhost:8100/build/main.js:163067:27)
    at new SyntaxError (http://localhost:8100/build/main.js:26304:16)
    at CompileMetadataResolver._getDependenciesMetadata (http://localhost:8100/build/main.js:46069:31)
    at CompileMetadataResolver._getTypeMetadata (http://localhost:8100/build/main.js:45944:26)
    at CompileMetadataResolver._getInjectableMetadata (http://localhost:8100/build/main.js:45932:21)
    at CompileMetadataResolver.getProviderMetadata (http://localhost:8100/build/main.js:46174:40)
    at http://localhost:8100/build/main.js:46132:49
    at Array.forEach (native)
    at CompileMetadataResolver._getProvidersMetadata (http://localhost:8100/build/main.js:46099:19)
    at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (http://localhost:8100/build/main.js:45572:30)
    at CompileMetadataResolver._loadDirectiveMetadata (http://localhost:8100/build/main.js:45460:23)
    at http://localhost:8100/build/main.js:45661:54
    at Array.forEach (native)
    at CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata (http://localhost:8100/build/main.js:45660:41)
```

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 10, 2017, 10:54pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520/4 "2017-03-10T22:54:22Z")

</div>

Please double-check that you actually did follow all the instructions in the link you mentioned in your first post. Specifically, make sure that you took `Storage` out of your AppModule’s `providers`.

---

<div class="post-metadata">

**Author:** ![davidgeller](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/davidgeller/32/105167_2.png) [@davidgeller](https://forum.ionicframework.com/u/davidgeller)\
**Post date:** [March 10, 2017, 10:57pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520/5 "2017-03-10T22:57:58Z")

</div>

Yes, followed those instructions.

My imports:

```
 imports: [
    IonicModule.forRoot(MyApp),
    AngularFireModule.initializeApp (firebaseConfig, authConfig),
    IonicStorageModule.forRoot()
  ],

```

My providers:

```
  providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}, 
              {provide: Globals, useClass: Globals}, 
              {provide: ActivityTracker, useClass: ActivityTracker}]

```

Where I’m using Storage (such as in my login.ts module) I import it as:

`import { Storage } from '@ionic/storage';`

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 10, 2017, 11:03pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520/6 "2017-03-10T23:03:40Z")

</div>

Is it possible you’re declaring `Storage` in a providers array of some other module or component? I just tried this with a scratch project and everything worked fine. If I add `Storage` to the `providers` array of the app module, I see the same error you are encountering.

---

<div class="post-metadata">

**Author:** ![davidgeller](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/davidgeller/32/105167_2.png) [@davidgeller](https://forum.ionicframework.com/u/davidgeller)\
**Post date:** [March 10, 2017, 11:44pm UTC](https://forum.ionicframework.com/t/trying-to-use-ionicstoragemodule-not-resolving-methods/82520/7 "2017-03-10T23:44:37Z")

</div>

> [@rapropos](#):
>
> Storage

Thank you. I _did_ discover a buried provider referencing Storage - and removed it. Now to fix an ion-split-panel issue… which I just discovered is now called ion-split-pane… 😉
