Unable to read args property of undefined error while compiling .ts file in Visual Studio Code IDE

I wrote a file tsconfig.json

containing

{
    "compilerOptions": {
        "target": "es5"
    }
}

      

And my file HelloWorld.ts

contains

function SayHello() {
    let x = "Hello World!";
    alert(x);
}

      

But when I compile this code in Visual Studio Code using Ctrl+ Shift+ BI get the following error (in the output window),

Cannot read property 'args' of undefined

      

My NodeJS version is 7.8.0 and TypeScript is 2.3.4

Can anyone help what is going on here?

+3


source to share


1 answer


I solved it, this url provides a reliable answer. url: https://github.com/Microsoft/TypeScript/issues/16850 .

This could be a problem with the integration of Visual Studio Code. You can try opening the command panel and try typing "configure task runner" and selecting "TypeScript -tsconfig.json". Then vscode will automatically generate a. vscode in current project and generate the following tasks.json file.



{
  "version": "0.1.0",
  "command": "tsc",
  "isShellCommand": true,
  "showOutput": "always"
}

      

+1


source







All Articles