Allen
Allen

Reputation: 29

Typescript "-bash: tsc.cmd: command not found"

Learning typescript recently. So I npm installed typescript globally(version 1.8.10), and it's working well to compile ts file into js file. However, when I tried to tsc.cmd to watch the changes in the src file(command line: "tsc.cmd -watch"), it gave me the error message in the title description--"-bash: tsc.cmd: command not found".

Appreciate it if someone who had similar situations can give me a hint. Cheers!

Upvotes: 0

Views: 1680

Answers (1)

Andrew Lobban
Andrew Lobban

Reputation: 2137

I recently came across that issue too.

Instead of running:

tsc.cmd -w

Run:

tsc -w

That's it! Hope that was helpful :D

Upvotes: 1

Related Questions