1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

NullInjectorError: No provider for TranslateService in dependency

Discussão em 'Angular' iniciado por Nuselva, Junho 11, 2025.

  1. Nuselva

    Nuselva Guest

    I created a custom Angular Library which uses TranslateModule as a dependency. When i use this library inside my main application as a NPM dependency, my application compile correctly, but the components inside my custom library throw the following error:

    NullInjectorError: R3InjectorError(AppModule)[TranslateService -> TranslateService -> TranslateService]: NullInjectorError: No provider for TranslateService!


    and don't show up.

    When i use the library directly after compiling it on my computer an copying the dist folder inside the node_modules of my project, the error dissapears, it only appears when i install it through npm

    Where could it come from?

    Continue reading...

Compartilhe esta Página