This error occurs in strict typescript in Angular 11 when using the ngx-translate functionality. In this case I use a core module (which acts like a "shared" module). Within the core module is a header component which needs to use the translate pipe. 

Solution

Fist, make sure your setup is right. In app.module.ts:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {HttpClient, HttpClientModule} from '@angular/common/http';
import { CoreModule } from './core/core.module';

/* Feature Modules */
import { environment } from '../environments/environment';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    CoreModule,
    ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
    HttpClientModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient]
      },
      isolate: false
    }),
  ],
  exports: [
  ],
  providers: [

  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

// required for AOT compilation
// https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-angular8-app-with-ngx-translate
export function HttpLoaderFactory(http: HttpClient) {
  return new TranslateHttpLoader(http);
}

Then, in your core module file core.module.ts:

import {inject, NgModule, Optional, SkipSelf} from '@angular/core';
import { CommonModule } from '@angular/common';
import { throwIfAlreadyLoaded } from './ensureModuleLoadedOnceGuard';
import { HeaderComponent } from './header/header.component';
import {TranslateModule} from '@ngx-translate/core';

@NgModule({
  imports: [
    CommonModule,
    TranslateModule.forChild()
  ],
  exports: [
    CommonModule, [HeaderComponent]
  ],
  declarations: [
    [HeaderComponent]
  ],
  providers: [
  ]
})
export class CoreModule {

  constructor(
    @Optional() @SkipSelf() parentModule: CoreModule,
  ) {
    throwIfAlreadyLoaded(parentModule, 'CoreModule');
  }

}

Then, in my header.component.html, which is imported in core.module.ts I can use my translation pipe!

{{ 'print_basket' | translate }}