title: How to build node.js projects against local versions of the dependencies?
body: <p>I've been trying to build a relatively complex node.js project (<a href="https://github.com/edrlab/thorium-reader/" rel="nofollow noreferrer">https://github.com/edrlab/thorium-reader/</a>) against local versions of some dependencies.</p>
  <p>I can build and run the project with the non-local dependencies without problems.</p>
  <p>I've tried different &quot;routes&quot;, such as adding the dependencies using <code>npm install --save &lt;path-to-dependency&gt;</code> or just adding a <code>file:&lt;path-to-dependency&gt;</code> reference to the <code>package.json</code> file. I've checked out the exact versions of each dependency.</p>
  <p><code>npm install</code> doesn't show any errors.</p>
  <p>Now when I run <code>npm run start</code> I get type errors that don't quite understand, such as:</p>
  <pre><code>Argument of type 'import(&quot;~/repositories/thirdparty/thorium/r2-opds-js/dist/es6-es2015/src/opds/opds2/opds2-facet&quot;).OPDSFacet' 
  is not assignable to parameter of type 
  'import(&quot;~/repositories/thirdparty/thorium/thorium-reader/node_modules/r2-opds-js/dist/es6-es2015/src/opds/opds2/opds2-facet&quot;).OPDSFacet'.
        Types of property 'Links' are incompatible.
  </code></pre>
  <p>Does anyone have a hint for me what I am doing wrong here ?</p>
  <p>I'm using node.js version 17.2.0 and npm version 8.2.0.</p>
  <p>Best,
  N</p>