ng-turkey / ngxs-reset-plugin

Reset plugin for NGXS: Effortlessly clears, resets, or overwrites NGXS states respecting the state tree.
https://stackblitz.com/edit/ngxs-pizza
MIT License
108 stars 8 forks source link

Cannot instantiate cyclic dependency! Store #31

Closed rabazit closed 2 years ago

rabazit commented 4 years ago

Hi , i was trying to use reset plugin but am getting thr below error any idea if am doing something wrong

@NgModule({ imports: [ CoreModule.forRoot({ environment, requirements: { layouts: LAYOUTS, }, }), ThemeSharedModule.forRoot(), AccountConfigModule.forRoot({ redirectUrl: '/' }), IdentityConfigModule, TenantManagementConfigModule, SettingManagementConfigModule,

    NgxsModule.forRoot([RequestCertificatesState,
        RequestAttachmentsState, CitiesState,
        RequestProductsState, BillsState, ClientRequestsState,
        ProductUnitsState, CountriesState, ProductsState, HsCodesState,
        RequestsState, TrademarksState, RequestProcessesState,
        RequestsStateAdmin, RequestdetailsState, AdminClientCRsState, PortsState]/*,
  { developmentMode: !environment.production }*/),
  NgxsResetPluginModule.forRoot(),
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
SharedModule,
FormsModule,
...(environment.production ? [] : LOGGERS),

], providers: [BnNgIdleService], // add it to the providers of your module declarations: [AppComponent], bootstrap: [AppComponent], })

compiler.js:10670 Uncaught Error: Provider parse errors: Cannot instantiate cyclic dependency! Store ("[ERROR ->]"): in NgModule AppModule in ./AppModule@-1:-1 at NgModuleProviderAnalyzer.parse (compiler.js:10670) at NgModuleCompiler.compile (compiler.js:20842) at JitCompiler._compileModule (compiler.js:25848) at compiler.js:25809 at Object.then (compiler.js:2166) at JitCompiler._compileModuleAndComponents (compiler.js:25807) at JitCompiler.compileModuleAsync (compiler.js:25769) at CompilerImpl.compileModuleAsync (platform-browser-dynamic.js:223) at compileNgModuleFactory__PRE_R3__ (core.js:40264) at PlatformRef.bootstrapModule (core.js:40599)

mehmet-erim commented 2 years ago

Hello,

Apologize for the delay. It was related to older versions of ABP. I assume your problem is resolved in the latest ABP. So, I'm closing this one. If you encounter any problems, please feel free to create a new issue. Thanks!