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
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
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.)