title: ts-node doesn't load a locally declared module
body: <p>I have a typescript package project with a layout like:</p>
  <pre><code> - index.d.ts
   - index.js
   - demo/
       - index.ts
  
  </code></pre>
  <p>The index.d.ts looks like:</p>
  <pre><code>declare module 'foo' {
      export function foo(str: string): boolean
  }
  </code></pre>
  <p>The root index.ts looks like this:</p>
  <pre><code>import { foo } from 'foo';
  console.log(foo('foo'));
  </code></pre>
  <p>When I run <code>ts-node demo/index.ts</code>, I get this:</p>
  <pre><code>src/index.ts:1:21 - error TS2307: Cannot find module 'foo' or its corresponding type declarations.
  
  1 import { foo } from 'foo';
  </code></pre>
  <p>Any ideas how I can use a module declared &quot;locally&quot; like this?</p>
  <p>If I import (the real) foo from a private npm registry, it all works fine. The content of the index.d.ts is the same. This is a head scratcher.</p>
  <p>Is there a nicer way to include an example of how to use/demo the project in the same repo (avoiding npm link, yalc, packing etc)</p>