The Issue at Hand
https://i.sstatic.net/MH9Xp.png
- Encountering difficulties in displaying import information for NPM modules in VS Code. Errors like
occur.[TS] Cannot find module 'lodash'/'react'/'etc'
- No problems occur when importing TypeScript-written NPM modules or those with a
typings
property in theirpackage.json
. - Webpack continues to compile successfully, indicating a potential issue with VS Code or the Typings tool.
Configuration Details
Started the day with tsc
1.8 and later updated to tsc
2.0.0.
Running VS Code 1.4.0 6276dcb0ae497766056b4c09ea75be1d76a8b679
Node version 5.10.0
tsc -v
: "Version 2.0.0"
tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"jsx": "react",
"experimentalDecorators": true,
"noImplicitAny": false,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": true,
"strictNullChecks": true
},
"exclude": [
"node_modules"
],
"compileOnSave": false,
"buildOnSave": false
}
Access the entire project source code here. Please note that it is quite an extensive codebase.