Skip to content

Compiler crashes when --moduleResolution is given non-predefined option #4728

@DanielRosenwasser

Description

@DanielRosenwasser
> tsc .\two.ts --module commonjs --moduleResolution fahrvergnügen

C:\Program Files (x86)\nodejs\node_modules\typescript\lib\tsc.js:386
        var text = getLocaleSpecificMessage(message.key);
                                                   ^
TypeError: Cannot read property 'key' of undefined
    at Object.createCompilerDiagnostic (C:\Program Files (x86)\nodejs\node_modules\typescript\lib\tsc.js:386:52)
    at parseStrings (C:\Program Files (x86)\nodejs\node_modules\typescript\lib\tsc.js:30466:52)
    at Object.parseCommandLine (C:\Program Files (x86)\nodejs\node_modules\typescript\lib\tsc.js:30426:9)
    at Object.executeCommandLine (C:\Program Files (x86)\nodejs\node_modules\typescript\lib\tsc.js:30721:30)
    at Object.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\typescript\lib\tsc.js:31042:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

This also works (crashes I mean) if you don't give any option at all.

Metadata

Metadata

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