TypeScript init:错误 TS6053:找不到文件“init.ts”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38433052/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
TypeScript init: error TS6053: File 'init.ts' not found
提问by Luka Jacobowitz
If I run tsc init
in a empty directory, I get the error:
如果我tsc init
在空目录中运行,则会收到错误消息:
error TS6053: File 'init.ts' not found
错误 TS6053:找不到文件“init.ts”
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 ?
我有一个理解问题:不应该tsc init
简单地创建一个 tsconfig.json 文件吗?如果没有,我可以使用哪个命令创建 tsconfig.json ?
p.s. Not a duplicate, other TS6053-posts are targeting another topics,..
ps 不是重复的,其他 TS6053 帖子针对的是其他主题,..
回答by Luka Jacobowitz
The command is wrong. You need to specify a flag:
命令是错误的。您需要指定一个标志:
tsc --init
Check out this pull requestfor more detail.
查看此拉取请求以获取更多详细信息。
回答by henrybbosa
You probably have a typo : type
你可能有一个错字:输入
tsc --init