9

My directory has 2 files: a tsconfig.json with simply {} and a hello.ts with a line that says console.log('help!!');.

When I run tsc hello I get the additional hello.js as expected.

If I delete hello.js and run tsc intending to pick up my configuration I get nothing. No error message, no hello.js. I'm sure I'm missing something easy!

NOTE: My hypersimple tsconfig is just for purposes of this discussion. I have tried several options including the simple one created with tsc --init. I don't want to include files specifically but have tsc pick up all the files in my folder as documented.

GaryB96
  • 371
  • 5
  • 13
  • 1
    Have you tried specifing `files: [ "hello.ts" ]` in the `tsconfig.json`? – Nitzan Tomer Aug 10 '16 at 20:59
  • Are you using a Windows computer? If so, what's the output of this command: `where tsc`? – cartant Aug 10 '16 at 21:19
  • I think we're going to need more information to figure this one out. I just set up a project identical to yours and running `tsc` on it's own generated the `hello.js` without problems. Is this Windows or Mac? Where is TypeScript installed? If windows, as the comment above me states, try `where tsc`. If mac, try `which tsc`. – mrand01 Aug 11 '16 at 03:09
  • thanks for looking. `where tsc` on my windows 7 machine yields C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.js – GaryB96 Aug 11 '16 at 13:10
  • I thought I had it installed globally by npm too so I'll try that. However, I will still be stumped by why it worked if specifying hello on the command line but not picking it up throught the tsconfig. – GaryB96 Aug 11 '16 at 13:16
  • `npm install typescript =g` and running `cmd` as administrator seems to work. I'm blaming my corporate desktop setup and not TypeScript! thanks for the help. – GaryB96 Aug 11 '16 at 13:42

0 Answers0