title: Install Angular library dependencies
body: <p>I'm using <strong>Angular 8</strong>. As per the business requirement, there is an isolated application that is separate from the main application but will be used in the main application.</p>
  <p>For that I created a <code>library</code> using the command</p>
  <pre><code>ng generate library my-library
  </code></pre>
  <p>The <strong>my-library/package.json</strong> has following dependencies</p>
  <pre><code>{
    &quot;name&quot;: &quot;my-library&quot;,
    &quot;version&quot;: &quot;0.0.1&quot;,
    &quot;peerDependencies&quot;: {
      &quot;@angular/common&quot;: &quot;^8.2.14&quot;,
      &quot;@angular/core&quot;: &quot;^8.2.14&quot;,
      &quot;ngx-device-detector&quot;: &quot;^1.4.5&quot;,
      &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.26&quot;,
      &quot;@fortawesome/free-brands-svg-icons&quot;: &quot;^5.12.0&quot;,
      &quot;@fortawesome/free-regular-svg-icons&quot;: &quot;^5.12.0&quot;,
      &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.12.0&quot;,
      &quot;ngx-spinner&quot;: &quot;^9.0.2&quot;
    }
  }
  </code></pre>
  <p>The library is inside the application in the <code>project</code> directory, thus the directory structure is</p>
  <pre><code>|- app
     |- package
        |- my-library
           |- src/
           |- package.json     # Library dependencies
     |- src                    # Main application
        |- app
        |- environments
     |- angular.json
     |- package.json           # Application dependencies
  </code></pre>
  <p>I installed the dependencies from <code>/app</code> directory</p>
  <pre><code>npm install
  </code></pre>
  <p>Then building the library using</p>
  <pre><code>ng build my-library
  </code></pre>
  <p>But this gives the error</p>
  <pre><code>...
  Cannot find module 'ngx-device-detector'
  ...
  </code></pre>
  <p><strong>How can I install the library dependencies?</strong></p>