Typescript Cannot find module
<p>Filter.ts, mustache.js and redux.3.5.2.js are in the same directory (/Scripts). The Filter.ts has the following code:</p>

<pre><code>///&lt;reference path="./typings/mustache.d.ts" /&gt;
import Mustache = require("mustache");
import Redux = require("redux.3.5.2");
</code></pre>

<p>In Visual studio code it shows an error on redux cannot find module. When I compile it it says:</p>

<blockquote>
  <p>Filter.ts(13,24): error TS2307: Cannot find module 'redux.3.5.2'.</p>
</blockquote>

<p>So how is it able to find mustache but not redux?</p>

<p>I did not add a typing file yet but how would that affect importing the file? It is not yet used anywhere in code? Also removing the mustache typing does not result in typescript not finding the file.</p>

<pre><code>$ ls *.js
requirejs.2.1.22.js  Filter.ts              mustache.js          redux.3.5.2.js
</code></pre>

<p><strong>[Update]</strong></p>

<p>Did an update of typescript:</p>

<pre><code>npm install -g typescript
</code></pre>

<p>tsc.cmd now tells me I have Version 1.8.10</p>

<p>My task.json looks like:</p>

<pre><code>{
    "version": "0.1.0",
    "command": "tsc.cmd",
    "isShellCommand": true,
    "showOutput": "silent",
    "problemMatcher": "$tsc"
}
</code></pre>

<p>and tsconfig.json looks like:</p>

<pre><code>{
    "compilerOptions": {
        "target": "es5",
        "watch": true,
        "module": "amd",
        "removeComments": true,
        "sourceMap": false,
        "outDir": "."
    }
}
</code></pre>

<p>Now Visual studio code complains it cannot find any of my required modules and tsc.cmd complains it still cannot find module 'redux.3.5.2'. Luckily after a couple of restarts of Visual studio code those errors went away but it is still not able to find redux. I'm not sure if it cannot find the file or something in the file is causing this problem because the error does not specify what the exact problem is.</p>