17

If I run tsc init in a empty directory, I get the error:

error TS6053: File 'init.ts' not found

I have an understanding question: Shouldn't tsc init simply create a tsconfig.json file? If not, with which command can I create a tsconfig.json ?

p.s. Not a duplicate, other TS6053-posts are targeting another topics,..

2 Answers2

34

The command is wrong. You need to specify a flag:

tsc --init

Check out this pull request for more detail.

Luka Jacobowitz
  • 22,795
  • 5
  • 39
  • 57
  • 1
    Oh, thank you! All other initialisers have the syntax `git init` or `npm init` and microsoft has 'tsc --init" :) But I see empirical knowledge makes you reckless,.. :) –  Jul 18 '16 at 09:40
  • Can I create a tsconfig.json with ""experimentalDecorators": true" in its initial creation? Is there a key for that? –  Jul 18 '16 at 09:42
  • 1
    Unfortunately I don't think that's currently possible, unless you change the defaults for the compiler globally. – Luka Jacobowitz Jul 18 '16 at 09:46
4

You probably have a typo : type

tsc --init
henrybbosa
  • 1,139
  • 13
  • 28