Search code examples
typescriptinittsconfig

TypeScript init: error TS6053: File 'init.ts' not found


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


Solution

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

    tsc --init
    

    Check out this pull request for more detail.