TypeScript error

I use web basics to compile my typescript files in save (Visual Studio 2012), but I got empty js and this message:

Compile Error. See error list for details error TS5012: Cannot read file 'C:/Users/Nor/Documents/Tribway/tribway-InvitationPage/Tribway/Scripts/Tribway/Invitations.ts': Unsupported file encoding. 
+6
source share
4 answers

File encoding was a problem with TS 0.9.0. Fixed in the latest version. You can download 0.9.1 from here: https://typescript.codeplex.com/releases/view/102929

PS: I recommend removing WebEssentials before installing 0.9.1, as they tend to conflict (webessentials starts a memory leak). TS 0.9.1 has pretty impressive and stable support for Visual Studio 2012

+2
source

I had this problem with TypeScript version 0.9.1.1 using Visual Studio 2012. The problem was caused by the fact that I inserted the pound sterling currency symbol into the file when the file had 'West European (Windows) - Codepage 1252' encoding.

The solution was to save the file with UTF-8 encoding (which I expected it to be in the first place).

To do this, in Visual Studio, click File → Advanced Save Options and select the Unicode encoding (UTF-8 with signature) - Codepage 65001 ', and then save the file. Then the TypeScript compiler is happy again.

+22
source

I have the same problem with TS 0.9.1, first with installing WebEssentials and then (with a clean install) with WebEssentials. I did not find any information to fix it.

I know that this is not a solution, but I returned to TS 8.1.0, with this version I have no "Unsupported file encoding" error.

I will try the next version of TS.

+1
source

I had a problem with TypeScript 0.9.5 using VS 2013. The problem was caused by the 'Ç' character in the ts file. Removing this symbol solved the problem.

0
source

Source: https://habr.com/ru/post/951613/


All Articles