Skip to content

TypeError when reading tsconfig.json #6620

@dbaeumer

Description

@dbaeumer
  • start tsc in watch mode
  • change the tsconfig.json to be invalid JSON

You get:

C:\Users\dirkb\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:31084
            var jsonOptions = json["compilerOptions"];
                                  ^
TypeError: Cannot read property 'compilerOptions' of undefined
    at getCompilerOptions (C:\Users\dirkb\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:31084:35)
    at Object.parseJsonConfigFileContent (C:\Users\dirkb\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:31074:22)
    at parseConfigFile (C:\Users\dirkb\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:31351:40)
    at performCompilation (C:\Users\dirkb\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:31362:45)
    at recompile [as _onTimeout] (C:\Users\dirkb\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:31454:13)
    at Timer.listOnTimeout (timers.js:92:15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions