title: Unexpected value ToasterModule Please add a @NgModule annotation
body: <p>I have been at this for 2.5 hours now and been thru multiple posts. Tried several suggestions on <a href="https://github.com/angular/angular/issues/15763" rel="nofollow noreferrer">https://github.com/angular/angular/issues/15763</a>, which frustrated me as the source of the above error seems different.</p>
  
  <p>I am on angular 5 and on build, I get the error:</p>
  
  <blockquote>
    <p>ERROR in : Unexpected value 'ToasterModule in .../node_modules/angular5-toaster/dist/bundles/angular5-toaster.umd.js' imported by the module 'AppModule in ../src/app/app.module.ts'. Please add a @NgModule annotation.</p>
  </blockquote>
  
  <p>the library don't have its own copy of node_modules. Its own <code>tsconfig.js</code> file is:</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es2015",
      "module": "es2015",
      "moduleResolution": "node",
      "sourceMap": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "removeComments": false,
      "noImplicitAny": false,
      "declaration": true,
      "stripInternal": true,
      "noUnusedLocals": false,
      "types": [ "jasmine", "node" ],
      "lib": ["es2015", "dom"]
    },
    "include": [
      "angular5-toaster.ts",
      "src/**/*"
    ],
    "exclude": [
        "node_modules",
        "bundles"
      ]
  }
  </code></pre>
  
  <p>angular5-toaster/package.json (partial):</p>
  
  <pre><code>"devDependencies": {
      "@angular/animations": "4.1.0",
      "@angular/common": "4.1.0",
      "@angular/compiler": "4.1.0",
      "@angular/compiler-cli": "4.1.0",
      "@angular/core": "4.1.0",
      "@angular/platform-browser": "4.1.0",
      "@angular/platform-browser-dynamic": "4.1.0",
      "@angular/platform-server": "4.1.0",
      "@types/jasmine": "2.5.47",
      "@types/node": "7.0.12",
  "module": "angular5-toaster.js",
    "name": "angular5-toaster",
    "optionalDependencies": {},
    "peerDependencies": {
      "@angular/common": "&gt;=4.0.0 &lt;=5.0.2",
      "@angular/compiler": "&gt;=4.0.0 &lt;=5.0.2",
      "@angular/core": "&gt;=4.0.0 &lt;=5.0.2",
      "rxjs": "^5.0.0-beta.11"
    },
  </code></pre>
  
  <p>My app.module.ts:</p>
  
  <pre><code>  import { NgModule} from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { BrowserModule } from '@angular/platform-browser';
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  import { AppRoutingModule } from './app-routing.module';
  import { AppComponent } from './app.component';
  import { Ng4LoadingSpinnerModule } from 'ng4-loading-spinner';
  import {ToasterModule, ToasterService} from 'angular5-toaster';
  @NgModule({
      imports: [
          CommonModule,
          BrowserModule,ToasterModule,
          BrowserAnimationsModule,
          Ng4LoadingSpinnerModule.forRoot(),
  
          AppRoutingModule
      ],
      declarations: [AppComponent],
      providers: [ToasterService
      ],
      bootstrap: [AppComponent, ]
  })
  export class AppModule {}
  </code></pre>
  
  <p>package.json:</p>
  
  <pre><code>{
    "name": "RLRC",
    "version": "4.0.0",
    "license": "MIT",
    "scripts": {
      "ng": "ng",
      "start": "ng serve --ec true",
      "build": "ng build --prod",
      "gitbuild": "ng build --prod --base /start-angular/RLRC/master/dist/",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "^5.0.1",
      "@angular/common": "^5.0.1",
      "@angular/compiler": "^5.0.1",
      "@angular/core": "^5.0.1",
      "@angular/forms": "^5.0.1",
      "@angular/http": "^5.0.1",
      "@angular/platform-browser": "^5.0.1",
      "@angular/platform-browser-dynamic": "^5.0.1",
      "@angular/router": "^5.0.1",
      "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.5",
      "@ngx-translate/core": "^8.0.0",
      "@ngx-translate/http-loader": "^2.0.0",
      "chart.js": "^2.7.1",
      "core-js": "^2.5.1",
      "datatables.net": "^1.10.16",
      "font-awesome": "^4.7.0",
      "jquery": "^3.2.1",
      "ng2-charts": "^1.6.0",
      "ng4-loading-spinner": "^1.1.1",
      "ngx-treeview": "^2.0.1",
      "rxjs": "^5.5.2",
      "yarn": "^1.3.2",
      "zone.js": "^0.8.18"
    },
    "devDependencies": {
      "@angular/cli": "1.5.0",
      "@angular/compiler-cli": "^5.0.1",
      "@angular/language-service": "^5.0.1",
      "@types/jasmine": "~2.6.3",
      "@types/jasminewd2": "~2.0.3",
      "@types/jquery": "^3.2.17",
      "@types/node": "~8.0.51",
      "codelyzer": "~4.0.1",
      "jasmine-core": "~2.8.0",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~1.7.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-cli": "~1.0.1",
      "karma-coverage-istanbul-reporter": "^1.2.1",
      "karma-jasmine": "~1.1.0",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.2.0",
      "ts-node": "~3.3.0",
      "tslint": "~5.8.0",
      "typescript": "~2.4.2"
    }
  }
  </code></pre>
  
  <p>I notice angular5-toaster (version 1.0.2) wasn't added to the list of dependence above but adding it didnt make any difference either.</p>
  
  <p>What could be the problem? I would appreciate help as i might face same problem with other libraries.</p>