PillowPillow / ng2-webstorage

Localstorage and sessionstorage manager - Angular service
MIT License
428 stars 92 forks source link

NullInjectorError: No provider for StrategyIndex! #135

Closed fzs1994 closed 4 years ago

fzs1994 commented 4 years ago

I'm getting the below error.

main.ts:13 NullInjectorError: StaticInjectorError(AppModule)[NgxWebstorageModule -> StrategyIndex]: 
  StaticInjectorError(Platform: core)[NgxWebstorageModule -> StrategyIndex]: 
    NullInjectorError: No provider for StrategyIndex!
    at NullInjector.get (http://localhost:4200/vendor.js:47636:27)
    at resolveToken (http://localhost:4200/vendor.js:49422:24)
    at tryResolveToken (http://localhost:4200/vendor.js:49348:16)
    at StaticInjector.get (http://localhost:4200/vendor.js:49211:20)
    at resolveToken (http://localhost:4200/vendor.js:49422:24)
    at tryResolveToken (http://localhost:4200/vendor.js:49348:16)
    at StaticInjector.get (http://localhost:4200/vendor.js:49211:20)
    at resolveNgModuleDep (http://localhost:4200/vendor.js:73261:29)
    at _callFactory (http://localhost:4200/vendor.js:73360:106)
    at _createProviderInstance (http://localhost:4200/vendor.js:73297:26)

image

My app.module has:

imports: [
    BrowserModule,
    NgxWebstorageModule.forRoot(),
"@angular/common": "~8.1.1",
"ngx-webstorage": "^6.0.0",

Let me know if need more info. Thanks

fzs1994 commented 4 years ago

I upgraded to Angular 9 and the error is resolved