After following the detailed instructions on how to install lodash into my Ionic 2 project from this link: , I still encountered an error during compilation:
Error TS2307: Unable to locate module 'lodash'.
The way I am importing the module in my code is like this:
import * as _ from 'lodash';
You can find my project here: https://github.com/will093/guess-game
Although the application runs smoothly, the typescript compiler seems to think that the lodash module is missing. I suspect that the issue may lie with my tsconfig file, but upon reviewing it, the filesGlob does include my definition files:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"filesGlob": [
"**/*.ts",
"!node_modules/**/*"
],
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
I would appreciate any assistance or insights you can provide. Thank you.