【问题标题】:Transcrypt without java?没有java的Transcrypt?
【发布时间】:2021-09-19 14:36:17
【问题描述】:

我尝试了 Transcrypt 教程中的“hello”示例,但收到以下错误消息:

      bash-4.3$ transcrypt hello
      
      Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.9.0
      Copyright (C) Geatec Engineering. License: Apache 2.0
      
      Saving target code in:
      /home/User/hello/__target__/org.transcrypt.__runtime__.js
      Saving minified target code in:
      /home/User/hello/__target__/org.transcrypt.__runtime__.js
      
      Error while compiling (offending file last):
File 'org.transcrypt.__runtime__', line 0, namely:
      
      [Errno 2] No such file or directory: 'java': 'java'
      
      Aborted

是需要java的谷歌编译器minifier导致的错误吗?有没有什么方法可以在没有 java 的情况下运行 Transcrypt?

【问题讨论】:

    标签: python transcrypt


    【解决方案1】:

    我用谷歌搜索了那个错误,发现 this promising GitHub issue comment 上面写着

    您现在可以通过使用-n 开关进行编译而无需缩小,因此无需Java。

    所以,试试

    transcrypt -n hello
    

    【讨论】:

      猜你喜欢
      • 2021-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-15
      • 2021-07-16
      • 1970-01-01
      • 2018-08-09
      相关资源
      最近更新 更多