Reputation: 8846
[TS] Cannot find module 'lodash'/'react'/'etc'.
typings
property in its package.json
) I don't see this issue.I was running tsc
1.8 this morning. I upgraded to tsc
2.0.0 later.
VS Code 1.4.0 6276dcb0ae497766056b4c09ea75be1d76a8b679
Node 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
}
Full project source code here. Disclaimer: it's a fairly large codebase.
Upvotes: 1
Views: 197
Reputation: 8846
I was able to solve the problem by adding the following to /.vscode/settings.json
:
{
"typescript.tsdk": "node_modules/typescript/lib",
}
Upvotes: 1