Filter.ts, mustache.js and redux.3.5.2.js are all located in the same directory (/Scripts). The code snippet within Filter.ts is as follows:
///<reference path="./typings/mustache.d.ts" />
import Mustache = require("mustache");
import Redux = require("redux.3.5.2");
An error is displayed in Visual Studio code indicating that it cannot find the module 'redux'. When attempting to compile, the following message appears:
Filter.ts(13,24): error TS2307: Cannot find module 'redux.3.5.2'.
The question arises - why is it able to locate mustache but not redux?
I have yet to add a typing file, so how would this impact importing the file? Furthermore, the file is not currently being utilized in any part of the code. Interestingly, removing the mustache typing does not result in TypeScript failing to find the file.
$ ls *.js
requirejs.2.1.22.js Filter.ts mustache.js redux.3.5.2.js
[Update]
After updating TypeScript:
npm install -g typescript
tsc.cmd now confirms that Version 1.8.10 is installed.
The task.json configuration is outlined as follows:
{
"version": "0.1.0",
"command": "tsc.cmd",
"isShellCommand": true,
"showOutput": "silent",
"problemMatcher": "$tsc"
}
Additionally, the tsconfig.json file has the following settings:
{
"compilerOptions": {
"target": "es5",
"watch": true,
"module": "amd",
"removeComments": true,
"sourceMap": false,
"outDir": "."
}
}
While errors related to missing modules initially persist, they eventually disappear after restarting Visual Studio code multiple times. However, the challenge of locating the redux module remains unresolved. It's unclear whether the issue lies in the file itself or if there is something within the file causing this problem, as the error message lacks specific details.