title: Use a local module, using local dependency
body: <p>I'm trying to include a local library, so i follow theese 2 tutorials: <a href="https://www.tsmean.com/articles/how-to-write-a-typescript-library/" rel="noreferrer">how to create library</a>, <a href="https://www.tsmean.com/articles/how-to-write-a-typescript-library/local-consumer/" rel="noreferrer">how to consume local library</a>. So, i have a nice sample library (it has package.json, index.ts, etc), i try to include it in my main project (<code>npm link</code> works fine, i can see a symlink to my lib), but i cant refer it from my main project.</p>
  
  <pre><code>import { HelloWorld } from "my-test-lib"; // "Cant find module"
  </code></pre>
  
  <p>Also, i tried to install it via <code>npm install ../libs/my-test-lib</code>, but results are the same: "Cant find module". Any suggestions on how to include it to my project?</p>
  
  <p>PS: i'd prefer something like <code>npm install</code>, so i'd be able to commit this change to the repository (as opposing to <code>npm link</code>).</p>
  
  <p>EDIT (<strong>why its not a duplicate</strong>): in <a href="https://stackoverflow.com/questions/15806241/how-to-specify-local-modules-as-npm-package-dependencies">how to specify local modules as npm package dependencies</a> its not clear which way to go: both <code>"bar":"file:../foo/bar"</code> and <code>npm link</code> are not working for me for the reason mentioned above. </p>
  
  <p>EDIT2: Okay, i've tried <code>"preinstall": "npm ln my-test-lib ../libs/my-test-lib"</code> in the package.json. And then <code>import { HelloWorld } from "my-test-lib";</code>. Still the same error "Cannot find module". Can it be something wrong with the package itself?</p>
  
  <p>EDIT3: So yes, the main point of this question is to figure out why </p>
  
  <pre><code>// package.json
  "dependencies": {
    "my-test-lib": "file:../lib/my-test-lib"
  }
  
  // ts file
  import { HelloWorld } from "my-test-lib";
  </code></pre>
  
  <p>is not working. Wondering, how can i debug that.</p>