首页 > 解决方案 > TypeScript Watch 选项不起作用 Windows 10 命令行

问题描述

我只是试图执行从 Windows 终端监视文件的代码:

tsc -w .\app.ts

我收到消息:

error TS5001: The current host does not support the --watch option.  

现在我研究了其他解决方案,我看到 GitHub 说尝试这样的解决方案,因为显然 tsc.exe 没有实现文件监视,而 node.js 有。

node tsc.js -w app.ts

但这又返回了另一条错误消息:

module.js:487 throw error; 
Error: Cannot find module 'C:.\..\tsc.js

我需要做什么才能超越这个问题?

标签: typescriptwindows-10

解决方案


推荐阅读