PillowPillow / ng2-webstorage

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

Error: Can't resolve all parameters for InMemoryStorageStrategy with @angular/core@9.0.0-rc.2 #121

Closed osahner closed 4 years ago

osahner commented 4 years ago

Versions (please complete the following information):

Describe the bug

main.ts:12 
Error: Can't resolve all parameters for InMemoryStorageStrategy: (?).
    at getUndecoratedInjectableFactory (core.js:18621)
    at injectableDefOrInjectorDefFactory (core.js:18605)
    at providerToFactory (core.js:18706)
    at providerToRecord (core.js:18655)
    at R3Injector.processProvider (core.js:18471)
    at core.js:18436
    at core.js:1134
    at Array.forEach (<anonymous>)
    at deepForEach (core.js:1134)
    at R3Injector.processInjectorType (core.js:18432)

To Reproduce Steps to reproduce the behavior:

1.) install @angular/cli@~9.0.0-rc.2

ng new app-test --style=scss --routing=true --skip-git --skip-tests
cd app-test
yarn add ngx-ngx-webstorage

2.) follow README

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgxWebstorageModule } from 'ngx-webstorage';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    NgxWebstorageModule.forRoot()
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

3.) run

ng serve -o
osahner commented 4 years ago

duplicate of https://github.com/PillowPillow/ng2-webstorage/pull/116

TraianBlueAir commented 3 years ago

Hi,

Please help!

I have the same error, how can I solve it?

Error: Can't resolve all parameters for InMemoryStorageStrategy: (?). at injectableDefOrInjectorDefFactory (vendor.js:58019) at providerToFactory (vendor.js:58105) at providerToRecord (vendor.js:58038) at R3Injector.processProvider (vendor.js:57928) at vendor.js:57910 at vendor.js:58136 at Array.forEach () at deepForEach (vendor.js:58132) at R3Injector.processInjectorType (vendor.js:57906) at vendor.js:57884

Thank you for your help!