File is not included in the TypeScript compilation context File is not included in the TypeScript compilation context typescript typescript

File is not included in the TypeScript compilation context


For the exact issue in my case, I included "**/*.ts" in “filesGlob” property in tsconfig.json to resolve. The whole tsconfig.json looks like this.

{  "compileOnSave": false,  "compilerOptions": {    "declaration": false,    "emitDecoratorMetadata": true,    "experimentalDecorators": true,    "mapRoot": "/",    "module": "commonjs",    "moduleResolution": "node",    "noEmitOnError": true,    "noImplicitAny": false,    "outDir": "../dist/",    "rootDir": ".",    "sourceMap": true,    "target": "es5",    "inlineSources": true  },  "filesGlob": [    "**/*.ts"  ],  "atom": {    "rewriteTsconfig": false  }}


For my case, the solution was different:

  1. Ensure that ALL files in your project have ALL the imports well written. (Case sensitive)
  2. Save all files. Close Atom. Restart your Computer. (Not necessary)
  3. Open Atom again. Done. :)

I will update if something else occurs with this bug.


Just ran into this issue with atom, in my case a ts file in a hidden directory was not being compiled. Explicitly adding the path in tsconfig.json resolved the issue:

"filesGlob": [  "**/*.ts",  ".serverless_plugins/**/*.ts",  "!node_modules/**"],