0

I got this exception when running tsc from cmd command line prompt (Windows 7 x64):

set tsc="c:\Program Files (x86)\nodejs\node_modules\typescript\bin"
%tsc%\tsc.js foo.ts
Fenton
  • 241,084
  • 71
  • 387
  • 401
David Berneda
  • 490
  • 5
  • 9

1 Answers1

1

The solution / workaround is to run tsc using node:

set node="c:\Program Files (x86)\nodejs"
set tsc=%node%\node_modules\typescript\bin
%node%\node %tsc%\tsc.js foo.ts

(It might be obvious but it took me sometime to figure out.)

David Berneda
  • 490
  • 5
  • 9