Your installation is wrong; you are using a very old compiler version (1.0.3.0).
tsc --version
should return a version of 2.5.2.
Check where that old compiler is located using: which tsc
(or where tsc
) and remove it.
Try uninstalling the "global" typescript
npm uninstall -g typescript
Installing as part of a local dev dependency of your project
npm install typescript --save-dev
Execute it from the root of your project
./node_modules/.bin/tsc
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…