Typescript error “Cannot write file … because it would overwrite input file.”

后端 未结 19 1584
醉梦人生
醉梦人生 2021-02-01 12:04

In my Typescript 2.2.1 project in Visual Studio 2015 Update 3, I am getting hundreds of errors in the error list like:

Cannot write file \'C:/{{my-project

19条回答
  •  执念已碎
    2021-02-01 12:30

    I had the same issue and it's because of the exclude option. If you specify exclude option, you have to add the output directory also.

    I had the exclude option like this "exclude": ["resources/js/**/*", "node_modules"] and the output directory set as outDir:"./build".

    Adding build to the exclude option fixed the issue.

    exclude:["resources/js/**/*", "node_modules", "build"]

提交回复
热议问题