title: Typescript can't find module on compile
body: <p>I'm trying to get path resolution to work in typescript.</p>
  
  <p>My folder structure so far looks like this:</p>
  
  <ul>
  <li>src:
  
  <ul>
  <li>index.ts</li>
  <li>types:
  
  <ul>
  <li>global.d.ts</li>
  <li>cache.d.ts</li>
  </ul></li>
  <li>util:
  
  <ul>
  <li>index.ts</li>
  <li>Cache.ts</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>Since It's getting pretty nested I would like to be able to access for example the util folder by typing
  <code>import { Whatever } from '@util'</code>. I've tried setting <code>baseUrl</code> to <code>./src</code> and <code>paths</code> to <code>"@util": ["util/index"]</code> with <code>moduleResolution</code> set to <code>node</code>. </p>
  
  <p>This is how my files look so far:</p>
  
  <p><strong>src/index.ts</strong></p>
  
  <pre><code>import {Cache} from '@util'
  
  const c = new Cache();
  </code></pre>
  
  <p><strong>src/util/index.ts</strong></p>
  
  <pre><code>export { default as Cache } from './Cache';
  </code></pre>
  
  <p><strong>src/util/Cache.ts</strong></p>
  
  <pre><code>export default class {
  // class code goes here
  }
  </code></pre>
  
  <p>Now, the compiler doesn't complain while I'm coding in VS Code but when I run <code>tsc</code> in the command line I get an error saying that it can't find the module '@util'. </p>
  
  <p>Does anyone have any ideas as to why I can't compile?</p>