Error: NullInjectorError: R3InjectorError(AuthorModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]:

Viewed 43

I'm following abp framework tutorial and Author route give the folowing error "ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AuthorModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! NullInjectorError: R3InjectorError(AuthorModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper!" enter image description here

project in github: https://github.com/heitorgiacomini/Xpto.Livraria-AngularFrontEnd

https://github.com/heitorgiacomini/Xpto.Livraria-BackEnd

1 Answers

Did you try providing the service to relevant module where the service is used. Note the providers array

@NgModule({
  imports:      [ BrowserModule, FormsModule ],
  declarations: [ AppComponent, HelloComponent ],
  bootstrap:    [ AppComponent ],
  providers: [ScrollBarHelper]
})
export class AppModule { }

UPDATE: NgxDatatableModule

Try adding NgxDatatableModule import

@NgModule({
  imports:      [ BrowserModule, FormsModule, NgxDatatableModule ],
  declarations: [ AppComponent, HelloComponent ],
  bootstrap:    [ AppComponent ],
  providers: [ScrollBarHelper]
})
export class AppModule { }
Related