title: 'Error: Cannot find module' from relative path in Typescript
body: <p>My <code>index.ts</code> file imports a class from a <code>bindings.d.ts</code> file, but I'm getting <code>Error: Cannot find module '../bindings'</code> at run-time with no compile-time errors from TS.</p>
  <p>My <code>bindings.d.ts</code>:</p>
  <pre><code>export class MyClass {
    sayHello(): string;
  }
  </code></pre>
  <p>My <code>index.ts</code>:</p>
  <pre><code>import { MyClass } from &quot;../bindings&quot;;
  
  console.log(MyClass);
  </code></pre>
  <p>My <code>tsconfig.json</code>:</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;target&quot;: &quot;es6&quot;,
      &quot;module&quot;: &quot;commonjs&quot;,
      &quot;outDir&quot;: &quot;./dist&quot;,
      &quot;rootDir&quot;: &quot;./src&quot;,
      &quot;strict&quot;: true,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;typeRoots&quot;: [
          &quot;@types&quot;,
          &quot;./node_modules/@types&quot;
      ],
      &quot;esModuleInterop&quot;: true,
      &quot;resolveJsonModule&quot;: true,
      &quot;skipLibCheck&quot;: true,
      &quot;forceConsistentCasingInFileNames&quot;: true,
    }
  }
  </code></pre>
  <p>My file tree:</p>
  <pre><code>- src
    - index.ts
  - bindings.d.ts
  - tsconfig.json
  - node_modules
  - @types
  </code></pre>
  <p>When running <code>ts-node src/index.ts</code>, I get the following error:</p>
  <pre><code>Error: Cannot find module '../bindings'
  Require stack:
  - /Users/slider/Desktop/myProject/src/index.ts
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
      at Function.Module._load (internal/modules/cjs/loader.js:746:27)
      at Module.require (internal/modules/cjs/loader.js:974:19)
      at require (internal/modules/cjs/helpers.js:92:18)
      at Object.&lt;anonymous&gt; (/Users/slider/Desktop/myProject/src/index.ts:4:1)
      at Module._compile (internal/modules/cjs/loader.js:1085:14)
      at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1043:23)
      at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
      at Object.require.extensions.&lt;computed&gt; [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:1046:12)
      at Module.load (internal/modules/cjs/loader.js:950:32)
  </code></pre>
  <p>I've also tried adding <code>&quot;ts-node&quot;: { &quot;files&quot;: true }</code> to <code>tsconfig.json</code> but to no avail. What am I missing?</p>