'Typescript not working with tsconfig.json
On running tsc --watch with tsconfig in project I am getting the error below. It requires types for react and redux in node js.
error TS2688: Cannot find type definition file for 'abstract-leveldown'.
The file is in the program because:
Entry point for implicit type library 'abstract-leveldown'
error TS2688: Cannot find type definition file for 'bn.js'.
The file is in the program because:
Entry point for implicit type library 'bn.js'
error TS2688: Cannot find type definition file for 'body-parser'.
The file is in the program because:
Entry point for implicit type library 'body-parser'
error TS2688: Cannot find type definition file for 'connect'.
The file is in the program because:
Entry point for implicit type library 'connect'
error TS2688: Cannot find type definition file for 'debug'.
The file is in the program because:
Entry point for implicit type library 'debug'
error TS2688: Cannot find type definition file for 'express'.
The file is in the program because:
Entry point for implicit type library 'express'
error TS2688: Cannot find type definition file for 'express-jwt'.
The file is in the program because:
Entry point for implicit type library 'express-jwt'
error TS2688: Cannot find type definition file for 'express-serve-static-core'.
The file is in the program because:
Entry point for implicit type library 'express-serve-static-core'
error TS2688: Cannot find type definition file for 'express-unless'.
The file is in the program because:
Entry point for implicit type library 'express-unless'
error TS2688: Cannot find type definition file for 'firebase'.
The file is in the program because:
Entry point for implicit type library 'firebase'
error TS2688: Cannot find type definition file for 'graceful-fs'.
The file is in the program because:
Entry point for implicit type library 'graceful-fs'
Please explain why this is happening. Do I have set up the project in Github.
Solution 1:[1]
I uninstalled node js and npm and reinstalled and still had the same problem. Then I noticed there was an npm and npm-cache folder and node_modules folder which uninstalling does not remove. When I removed them and reinstalled node voila! my code started working. My bet is that node_modules was probably guilty.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ayush Dubey |
