After updating my TypeScript to the latest version, I keep encountering the following error: Cannot find type definition file for 'mocha'.
tsconfig.json
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"sourceMap": true,
"suppressImplicitAnyIndexErrors": true,
"target": "es5",
"rootDir": "app",
"outDir": "wwwroot/app"
},
"exclude": [
"node_modules",
"wwwroot/node_modules",
"typings"
]
}
I haven't made any changes. It was working perfectly before I updated TypeScript from version 2.2.2 to 2.5 and now this error persists. My project is built with Angular 4.
Package.json
{
"version": "1.0.0",
"name": "asp.net",
"private": true,
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/compiler-cli": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/platform-server": "^4.0.0",
"@angular/router": "^4.0.0",
"@angular/upgrade": "2.0.0",
"angular2-in-memory-web-api": "0.0.20",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.9",
"rxjs": "5.0.2",
"systemjs": "0.19.27",
"typescript": "^2.4.1",
"zone.js": "0.7.6"
},
"devDependencies": {}
}