title: Angular 7: can't find module. can't resolve 'underscore'
body: <p>I am working on angular 7 project. I tried to install </p>
  
  <pre><code> npm install --save @types/underscore
  </code></pre>
  
  <p>and i get following errors:</p>
  
  <blockquote>
    <p>npm WARN @agm/core@1.0.0-beta.5 requires a peer of
    @angular/common@^5.0.0 || ^6.0.0 but none is installed. You must
    install peer dependencies yourself. npm WARN @agm/core@1.0.0-beta.5
    requires a peer of @angular/core@^5.0.0 || ^6.0.0 but none is
    installed. You must install peer dependencies yourself. npm WARN
    @angular/cdk@6.4.7 requires a peer of @angular/core@>=6.0.0-beta.0
    &lt;7.0.0 but none is installed. You must install peer dependencies
    yourself. npm WARN @angular/cdk@6.4.7 requires a peer of
    @angular/common@>=6.0.0-beta.0 &lt;7.0.0 but none is installed. You must
    install peer dependencies yourself. npm WARN @angular/material@6.4.7
    requires a peer of @angular/core@>=6.0.0-beta.0 &lt;7.0.0 but none is
    installed. You must install peer dependencies yourself. npm WARN
    @angular/material@6.4.7 requires a peer of
    @angular/common@>=6.0.0-beta.0 &lt;7.0.0 but none is installed. You must
    install peer dependencies yourself. npm WARN
    @angular/platform-server@6.1.10 requires a peer of
    @angular/animations@6.1.10 but none is installed. You must install
    peer dependencies yourself. npm WARN @angular/platform-server@6.1.10
    requires a peer of @angular/common@6.1.10 but none is installed. You
    must install peer dependencies yourself. npm WARN
    @angular/platform-server@6.1.10 requires a peer of
    @angular/compiler@6.1.10 but none is installed. You must install peer
    dependencies yourself. npm WARN @angular/platform-server@6.1.10
    requires a peer of @angular/core@6.1.10 but none is installed. You
    must install peer dependencies yourself. npm WARN
    @angular/platform-server@6.1.10 requires a peer of
    @angular/platform-browser@6.1.10 but none is installed. You must
    install peer dependencies yourself. npm WARN
    @angular/platform-server@6.1.10 requires a peer of
    @angular/platform-browser-dynamic@6.1.10 but none is installed. You
    must install peer dependencies yourself. npm WARN codelyzer@4.3.0
    requires a peer of @angular/compiler@>=2.3.1 &lt;7.0.0 || >6.0.0-beta
    &lt;7.0.0 but none is installed. You must install peer dependencies
    yourself. npm WARN codelyzer@4.3.0 requires a peer of
    @angular/core@>=2.3.1 &lt;7.0.0 || >6.0.0-beta &lt;7.0.0 but none is
    installed. You must install peer dependencies yourself. npm WARN
    @angular/animations@6.1.10 requires a peer of @angular/core@6.1.10 but
    none is installed. You must install peer dependencies yourself. npm
    WARN @angular/router@6.1.10 requires a peer of @angular/core@6.1.10
    but none is installed. You must install peer dependencies yourself.
    npm WARN @angular/router@6.1.10 requires a peer of
    @angular/common@6.1.10 but none is installed. You must install peer
    dependencies yourself. npm WARN @angular/router@6.1.10 requires a peer
    of @angular/platform-browser@6.1.10 but none is installed. You must
    install peer dependencies yourself. npm WARN ngx-toastr@9.1.0 requires
    a peer of @angular/core@^6.0.0 but none is installed. You must install
    peer dependencies yourself. npm WARN ngx-toastr@9.1.0 requires a peer
    of @angular/common@^6.0.0 but none is installed. You must install peer
    dependencies yourself. npm WARN ngx-toastr@9.1.0 requires a peer of
    @angular/platform-browser@^6.0.0 but none is installed. You must
    install peer dependencies yourself.</p>
    
    <ul>
    <li>@types/underscore@1.8.9 added 1 package from 5 contributors and audited 40215 packages in 20.546s found 0 vulnerabilities</li>
    </ul>
  </blockquote>
  
  <p>after it i get this error:</p>
  
  <pre><code>./src/app/services/pager.service.ts
  Module not found: Error: Can't resolve 'underscore' in 'e:\xampp\htdocs\testapp\src\app\services
  </code></pre>
  
  <p>Please help me.</p>