cincheo/jsweet-examples

tsc is missing

Closed this issue · 5 comments

I run mvn generate-sources and get the following error

    [java] 2015-11-19 20:28:51.051 ERROR ProcessUtil:163 - Cannot run program "tsc" (in directory "/tmp/jsweet-examples/.ts"): error=2, No such file or directory
     [java] java.io.IOException: Cannot run program "tsc" (in directory "/tmp/jsweet-examples/.ts"): error=2, No such file or directory
     [java]     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
     [java]     at org.jsweet.transpiler.util.ProcessUtil.runCommand(ProcessUtil.java:121)
     [java]     at org.jsweet.transpiler.JSweetTranspiler.ts2js(JSweetTranspiler.java:900)
     [java]     at org.jsweet.transpiler.JSweetTranspiler.transpile(JSweetTranspiler.java:520)
     [java]     at org.jsweet.JSweetCommandLineLauncher.main(JSweetCommandLineLauncher.java:127)
     [java] Caused by: java.io.IOException: error=2, No such file or directory
     [java]     at java.lang.UNIXProcess.forkAndExec(Native Method)
     [java]     at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
     [java]     at java.lang.ProcessImpl.start(ProcessImpl.java:134)
     [java]     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
     [java]     ... 4 more
     [java] ERROR: Unknown tsc error at <unknown>:<unknown>

What the easiest / recommended way of installing tsc?

Normally, JSweet is supposed to install tsc automatically (through nodejs). It must have failed somewhere before that error. Can you send the full trace?

Follow-up: I have managed to reproduce the issue under Linux. So it is a Linux problem (it works under Windows). I will investigate more and get back to you.

Hi Martin!

Hopefully, the issue should be fixed! :)
I am saying hopefully, because it is basically a permission issue under Linux, and it is always tricky to solve these, especially from Java. I had to change various things and I hope it will not regress...

So I am curious to hear your feedback... You may need to clean your local maven repo for org.jsweet. so that you get the new JSweet snapshot.

it works, thanks.

Great! I will update the documentation...