cincheo / jsweet-examples

A set of simple examples to show what can be done with the JSweet transpiler (Java to JavaScript)
Apache License 2.0
37 stars 18 forks source link

tsc is missing #2

Closed monperrus closed 8 years ago

monperrus commented 8 years ago

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?

renaudpawlak commented 8 years ago

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

renaudpawlak commented 8 years ago

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.

renaudpawlak commented 8 years ago

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.

monperrus commented 8 years ago

it works, thanks.

renaudpawlak commented 8 years ago

Great! I will update the documentation...