I can't Transpiling TypeScript to JavaScript

I installed the newest WebStorm 6.0, and want to code with typescript. I followed the Help Page about "Transpiling TypeScript to JavaScript"
but when I save the sample.ts in the IDE, the console warn the following:

C:\Users\qcgm1978\AppData\Roaming\npm\tsc.cmd --sourcemap sample.ts
'node' is not recognized as an internal or external command,
operable program or batch file.

What can I do? I installed typescript, and set File Watchers.

Pleat tell me what I should do.

Best Regards.
a Chinese developer.

4 comments
Comment actions Permalink

Hi there,

For whatever reason IDE cannot find your node.js installation. Try restarting your PC -- possibly PATH variable is not picked up properly.

BTW -- are you able to compile/transpile it manually from console?

0
Comment actions Permalink

You are perfectly right. I restart the computer and all is right. Thank you and your product.

Best Regards

from a chinese developer

0
Comment actions Permalink

Also you can manually add node folder to the environment variables for your file watcher(Settings -> File Watchers -> Double click on TypeScript -> Environment variables)

0
Comment actions Permalink

I follow your advice and set environment variable which value is my nodejs' file folder path. Now I don't meet any question.Thank you.

Best Regards.

from a Chinese developer

0

Please sign in to leave a comment.