Skip to content

TypeScript wont read the tsconfig.json #41747

Description

@cborac

TypeScript Version: 4.2.0-dev.20201201

Search Terms: Typescript undefined config

My tsconfig.json:

{
     "compilerOptions": {
         "module": "commonjs",
         "target": "es2019",
         "types": [
             "node"
         ],
         "strict": true,
         "moduleResolution": "node",
         "declaration": false,
         "resolveJsonModule": true,
         "removeComments": false,
         "esModuleInterop": true,
         "alwaysStrict": true,
         "pretty": true,
         "sourceMap": true,
         "outDir": "dist",
         "incremental": true,
         "noEmitHelpers": true,
         "importHelpers": true,
         "skipLibCheck": true,
         "strictNullChecks": false
     },
     "include": ["src/**/**.**"]
 }

My folder structure
folder

Expected behavior: Transpiling the code

Actual behavior: Throws an error

C:\Users\BoraC\Desktop\Projects\g-lua-tr-bot>tsc
undefined:1

SyntaxError: Unexpected token  in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.getBuildInfo (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:81612:21)
    at readBuilderProgram (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:91421:28)
    at Object.createIncrementalProgram (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:91442:26)
    at Object.performIncrementalCompilation (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:91402:33)
    at performIncrementalCompilation (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:93675:29)
    at executeCommandLineWorker (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:93547:17)
    at Object.executeCommandLine (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:93595:20)
    at Object.<anonymous> (C:\Users\BoraC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:93882:4)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions