title: "Error: Arguments array must have arguments." AppModule
body: <p>When running ng serve with a successful compilation in my Angular app, I started getting the following error in the browser console. </p>
  
  <pre><code>AppComponent_Host.ngfactory.js? [sm]:1 ERROR Error: Arguments array must have arguments.
  
  at injectArgs (core.js:1412)
  
  at core.js:1491
  
  at _callFactory (core.js:8438)
  
  at _createProviderInstance (core.js:8396)
  
  at resolveNgModuleDep (core.js:8371)
  
  at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get
  (core.js:9064)
  
   at resolveDep (core.js:9429)
  
   at createClass (core.js:9309)
  
   at createDirectiveInstance (core.js:9186)
  
    at createViewNodes (core.js:10406)
  </code></pre>
  
  <p>This as far as I can tell from Main.ts <code>platformBrowserDynamic().bootstrapModule(AppModule)
    .catch(err =&gt; console.log(err));</code></p>
  
  <p>I have deleted the node modules folder and reinstalled and I'm having trouble with the lack of explanation the error gives. Plus, I'm somewhat new to Angular. </p>
  
  <p>Any help would be greatly appreciated. </p>
  
  <h1>EDIT</h1>
  
  <p>I ran <code>ng serve --aot</code> and got the following error</p>
  
  <pre><code>ERROR in : Error: Internal error: unknown identifier []
   at Object.importExpr$$1 [as importExpr] (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:21731:27)
   at C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:9988:37
   at Array.map (&lt;anonymous&gt;)
   at InjectableCompiler.depsArray (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:9954:25)
   at InjectableCompiler.factoryFor (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:10018:36)
   at InjectableCompiler.injectableDef (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:10037:42)
   at InjectableCompiler.compile (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:10047:106)
   at C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:21576:90
   at Array.forEach (&lt;anonymous&gt;)
   at AotCompiler._emitPartialModule2 (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:21576:25)
   at C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:21569:48
   at Array.reduce (&lt;anonymous&gt;)
   at AotCompiler.emitAllPartialModules2 (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler\bundles\compiler.umd.js:21568:26)
   at AngularCompilerProgram._emitRender2 (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler-cli\src\transformers\program.js:364:31)
   at AngularCompilerProgram.emit (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@angular\compiler-cli\src\transformers\program.js:236:22)
   at AngularCompilerPlugin._emit (C:\Users\kg\Documents\ang2\ad\UI\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:846:49)
  </code></pre>
  
  <h2>ngModule</h2>
  
  <pre><code>@NgModule({
    declarations: [
      AppComponent,
      LoginComponent,
      ItemDashboardComponent,
      UnprotectedSearchComponent,
      HomeComponent,
      UnprotectedResultsComponent,
      DashboardComponent,
      TrackingListComponent,
      ListItemComponent,
      ActionItemComponent,
      ActionListComponent,
      ItemInfoTableComponent,
      TrackingInfoTableComponent,
      FilterPipe,
      RegisterItemsComponent,
      RegisterPackageComponent,
      AddItemsPackageComponent,
      ChangeCustodyComponent,
      CheckTempComponent,
      RemoveItemsComponent,
      ScannerComponent,
      ContainerDashboardComponent,
      SoldComponent
    ],
    imports: [
      NgQrScannerModule,
      MatTabsModule,
      AngularFontAwesomeModule,
      MatListModule,
      MatFormFieldModule,
      BrowserAnimationsModule,
      MatMenuModule,
      MatProgressBarModule,
      BrowserModule,
      MatIconModule,
      MatGridListModule,
      AngularFontAwesomeModule,
      FormsModule,
      AppRoutingModule,
      HttpClientModule,
      RouterModule.forRoot([
        {
          path: 'home',
          component: HomeComponent
        },
        //{path: 'openSearch', component: LoginComponent},
        {
          path: 'item',
          component: ItemDashboardComponent,
          canActivate: [AuthGuard, ManufacturerAuthGuardService]
        },
        {
          path: 'dashboard',
          component: DashboardComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'unprotectedResults',
          component: UnprotectedResultsComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'trackingList/'+environment.config.itemWorkflow+'/:contractId',
          component: ItemDashboardComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'trackingList/'+environment.config.packageWorkflow+'/:contractId',
          component: ContainerDashboardComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'trackingList',
          component: TrackingListComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'actions',
          component: ActionListComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'publicResults/:contractId',
          component: UnprotectedResultsComponent
        },
        {
          path: 'registerItems',
          component: RegisterItemsComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'addItemsToPackage',
          component: AddItemsPackageComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'registerPackage',
          component: RegisterPackageComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'changeCustody/:contractId',
          component: ChangeCustodyComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'changeCustody',
          component: ChangeCustodyComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'checkTemp',
          component: CheckTempComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'removeItems',
          component: RemoveItemsComponent,
          canActivate: [AuthGuard]
        },
        {
          path: 'sellItems',
          component: SoldComponent,
          canActivate: [AuthGuard]
        },
  
  
      ]),
      UiModule
    ],
    providers: [
      AuthGuard,
      {
        provide: HTTP_INTERCEPTORS,
        useClass: MyInterceptor,
        multi: true
      },
      MockBackend,
      fakeBackendProvider,
      BaseRequestOptions,
      AuthGuard,
      AdminAuthGuard,
      AdalService,
      SoldComponent
    ],
    bootstrap: [AppComponent]
  })
  </code></pre>
  
  <h2>AppComponent Constructor</h2>
  
  <pre><code>constructor(private api: ApiService, private adalService: AdalService, private _http: HttpClient, private router: Router, public authService: AuthService) {
      this.adalService.init(environment.config);
      if (!this.adalService.userInfo.authenticated) this.router.navigate(['/']);
    }
  </code></pre>