[英]Cannot read property 'args' of undefined error while compiling a .ts file in Visual Studio Code IDE
I have written a tsconfig.json
file which contains, 我写了一个包含的tsconfig.json
文件,
{
"compilerOptions": {
"target": "es5"
}
}
And my HelloWorld.ts
file contains, 我的HelloWorld.ts
文件包含,
function SayHello() {
let x = "Hello World!";
alert(x);
}
But, when I compile this code in Visual Studio Code using Ctrl + Shift + B I'm receiving the below error (in the output window), 但是,当我使用Ctrl + Shift + B在Visual Studio代码中编译此代码时,我收到以下错误(在输出窗口中),
Cannot read property 'args' of undefined
My NodeJS Version is 7.8.0, and TypeScript version is 2.3.4 我的NodeJS版本是7.8.0,TypeScript版本是2.3.4
Can someone help what's going wrong here? 有人可以帮助解决这里出了什么问题吗?
I have solved it,This url provides a reliable answer. 我已经解决了,这个网址提供了一个可靠的答案。 url: https://github.com/Microsoft/TypeScript/issues/16850 . 网址: https : //github.com/Microsoft/TypeScript/issues/16850 。
This might actually be an issue with Visual Studio Code integration, You can try to open the command panel and try typing "configure task runner" and select "TypeScript-tsconfig.json" .Then vscode will automatically generate a .vscode folder under the current Project and generate the following tasks.json file. 这可能是Visual Studio Code集成的一个问题,您可以尝试打开命令面板并尝试键入“configure task runner”并选择“TypeScript-tsconfig.json”。然后vscode将自动生成当前的.vscode文件夹项目并生成以下tasks.json文件。
{
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"showOutput": "always"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.