Filter.ts, mustache.js and redux.3.5.2.js are in the same directory (/Scripts). The Filter.ts has the following code:
///<reference path="./typings/mustache.d.ts" />
import Mustache = require("mustache");
import Redux = require("redux.3.5.2");
In Visual studio code it shows an error on redux cannot find module. When I compile it it says:
Filter.ts(13,24): error TS2307: Cannot find module 'redux.3.5.2'.
So how is it able to find mustache but not redux?
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.
$ ls *.js
requirejs.2.1.22.js Filter.ts mustache.js redux.3.5.2.js
[Update]
Did an update of typescript:
npm install -g typescript
tsc.cmd now tells me I have Version 1.8.10
My task.json looks like:
{
"version": "0.1.0",
"command": "tsc.cmd",
"isShellCommand": true,
"showOutput": "silent",
"problemMatcher": "$tsc"
}
and tsconfig.json looks like:
{
"compilerOptions": {
"target": "es5",
"watch": true,
"module": "amd",
"removeComments": true,
"sourceMap": false,
"outDir": "."
}
}
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.