简体   繁体   English

生成错误tsc.exe退出,代码为2

[英]Build error tsc.exe exited with code 2

After including node_modules I am getting the error tsc.exe exited with code 2 How can I solve this error? 包含node_modules后,出现错误tsc.exe,代码2退出了。如何解决此错误?

My tscongfig.json is:- 我的tscongfig.json是:-

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  }
}

I have solved the above issue by changing the Microsoft.TypeScript.targets file, I made changes as:- 我已经通过更改Microsoft.TypeScript.targets文件解决了上述问题,我将更改如下:-

 <TypeScriptCompileBlocked Condition="'$(TypeScriptCompileBlocked)' == ''">true</TypeScriptCompileBlocked>

by default it was true. 默认情况下是这样。 After changing this it is building fine. 更改此设置后,它可以正常运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM