I, am keep getting the error: Cannot find type definition file for 'mocha' when I update the TypeScript to latest version.
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, have not change any things. It was working perfectly earlier just I update the TypeScript version from 2.2.2 to 2.5 and keep getting error. I, am using 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": {}
}
You need to install type definitions for mocha:
npm install @types/mocha
This is an issue on @nestjs/microservice
and it is fixed on upgrading it to 6.5.1
Please check the issue here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With