2016-11-17 47 views
1

我已经安装了Typescript 2.0.6,我也正在安装节点。如果我尝试在手表模式下使用“-w”编译文件,它不起作用。它抛出下面的错误。Typescript -w(手表)在我的安装中不起作用

ts5001: the current host does not support the '--watch' option 

用下面的命令来编译我的打字稿文件“index.ts”

tsc -w index.ts 

如果哪位知道请帮我如何编译手表模式的代码。

回答

0

不能使用tsc

运行运行打字稿代码得到watch功能,它像 node tsc.js -w index.ts

来源:https://github.com/Microsoft/TypeScript/issues/2375

+0

嗨,我想这个选项它投掷的错误。 module.js:471 throw err; ^ 错误:找不到模块'F:\ Build \ MAS \ Typescript \ tsc.js' – krrr25

+0

这是同样的错误吗? –

+0

你使用npm安装了tsc吗? –