title: NullInjectorError: No provider for t! NullInjectorError: StaticInjectorError(ba)[Cw -> t]:
body: <p>When I run my prod build of my Angular 8 app, I am getting this error in console. The build runs fine and I've included all services in my provider. </p>
  
  <p>I've run the following commands but do not get any errors. 
  <code>ng build --prod --optimization=false</code>
  Is there any way to tell what is failing? Even when I comment out all the providers (expecting the build the fail), I still receive no errors. </p>
  
  <p>Please let me know what other information I can/should provide for your help. Thanks!</p>
  
  <p>error message:
  <a href="https://i.stack.imgur.com/46I8Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/46I8Y.png" alt="enter image description here"></a></p>
  
  <p>app.module.ts</p>
  
  <pre class="lang-ts prettyprint-override"><code>import { NgModule } from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
  
  import { HttpClientModule, HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
  import { RouterModule } from '@angular/router';
  import { AppComponent } from './app.component';
  import { HomeComponent } from './home/home.component';
  import { NavMenuComponent } from './nav-menu/nav-menu.component';
  
  //a bunch more components...
  
  import { AccountModule } from './account/account.module';
  import { AccountRoutingModule } from './account/account.routing.module';
  import { AuthGuard } from './helpers/auth.guard';
  import { ErrorInterceptor } from './helpers/error.interceptor';
  import { JwtInterceptor } from './helpers/jwt.interceptor';
  
  import { TemplateService } from './services/template.service';
  import { ExerciseService } from './services/exercise.service';
  import { ExamService } from './services/exam.service';
  import { AuthService } from './services/auth.service';
  import { FeatureService } from './services/feature.service';
  import { RoleService } from './services/role.service';
  import { UserService } from './services/user.service';
  
  @NgModule({
    declarations: [
      AppComponent,
      NavMenuComponent,
      HomeComponent,
  
    ],
    imports: [
      BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
      HttpClientModule,
      FormsModule,
      ReactiveFormsModule,
      BrowserAnimationsModule,
      AccountModule,
      AccountRoutingModule,
      RouterModule.forRoot([
        { path: '', component: HomeComponent, canActivate: [AuthGuard] },
        //all routes left out for brevity
      ])
    ],
    //entryComponents: [NewTemplateModal, NewExerciseModal, AddFeaturesModal, SaveSuccessComponent, ErrorComponent],
    providers: [    
      AuthService,
      ExamService,
      ExerciseService,
      FeatureService,
      RoleService,
      TemplateService,
      UserService,
      HttpClient,
      { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
      { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
    ],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  
  </code></pre>
  
  <p>build:
  <a href="https://i.stack.imgur.com/NilZS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NilZS.png" alt="enter image description here"></a></p>