Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build:Unknown compiler option 'listemittedfiles'

I get the error as below when building project after uninstalling the TypeScript 2.0. (Visual Studio 2015)

tsc : error TS5023: Build:Unknown compiler option 'listemittedfiles'.

Do you know how to fix it? Thanks,

like image 357
Emma Avatar asked Sep 30 '16 02:09

Emma


2 Answers

I had my hard times yesterday trying to fix this nasty issue: I finally found out that MSBuild was still using an old TypeScript version instead of the latest one. To fix it for good, you should do the following:

  • Install the updated Visual Studio 2015 TypeScript Tools (2.0.6 at the time of writing)
  • (optionally) remove the TypeScript 1.x references from your PATH environment variable and/or replace them with the new TypeScript 2.x folder path.

Doing this will point MSBuild to the proper TypeScript build, which fully supports the --listEmittedFiles command switch.

For more info regarding this issue I also suggest you to read this article that I've written about such topic and also these two Github threads (affiliation warning: the second one being on the GitHub repo of a book I wrote):

  • https://github.com/aspnet/Tooling/issues/651
  • https://github.com/PacktPublishing/ASPdotNET-Core-and-Angular-2/issues/1
like image 135
Darkseal Avatar answered Nov 10 '22 08:11

Darkseal


I had the some problem. I found out, that I had a wrong (i.e. older) version of typescript installed (in addition to the current one) and even though the latest version was installed too, the old typescript compiler (tsc) was used.

Open a MSBuild Windows Console and run the command following command:

tsc -v

and see what version it gives

uninstalling the old version solved the problem

like image 1
Emmanuel Avatar answered Nov 10 '22 07:11

Emmanuel