I've encountered an error while trying to build a webapp using Angular that I can't seem to resolve:
ERROR in src/app/app.module.ts(22,5): error TS2322: Type 'ModuleWithProviders' is not assignable to type 'any[] | Type'. Type 'ModuleWithProviders' is missing the following properties from type 'Type': apply, call, bind, prototype, and 5 more.
This is my app.module.ts file:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
import { AppRoutingModule } from './app-routing.module';
import { ComponentsModule } from './components/components.module';
import { AppComponent } from './app.component';
import { AdminLayoutComponent } from './layouts/admin-layout/admin-layout.component';
@NgModule({
declarations: [
BrowserAnimationsModule,
FormsModule,
HttpClientModule,
ComponentsModule,
RouterModule,
AppRoutingModule,
NgbModule,
ToastrModule.forRoot()
],
imports: [
AppComponent,
AdminLayoutComponent
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
The error points to the line with ToastrModule.forRoot()
Here's my package.json:
{
"name": "pum-pum-pum",
"version": "0.0.0",
// scripts section...
}
I could really use some assistance on this issue.