在Ubuntu12.04LTS上,尝试在lein项目目录下使用lein获取closurescript repl。我有一个基本的hello-world项目,我用它创建 lein new hello-world, ,和一个习俗 project.clj (下面列出)。对于我来说,相同的设置在Mac OS x7上运行良好。

$ lein trampoline cljsbuild repl-rhino Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath:  (subproject.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:5441)   
        ...
Caused by: java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath: 
    at clojure.lang.RT.load(RT.java:412)

$ lein --version
Leiningen 1.7.1 on Java 1.6.0_27 OpenJDK 64-Bit Server VM

项目。clj:

(defproject hello-world "1.0.0-SNAPSHOT"
  :description "FIXME: write description"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2030"]]
  :plugins [[lein-cljsbuild "1.0.0-alpha2"]]
  :cljsbuild {:builds []})
有帮助吗?

解决方案

目前你必须使用 lein cljsbuild (但我认为你必须更新你的项目中声明的lein-cljsbuild插件的版本。clj[我正在使用:0.3.0],并且您必须使用(24)exec运行repl或compilations(once,auto)任务

在这里,您可以查看有关此leiningen工具的更多信息 https://github.com/emezeske/lein-cljsbuild

在这里,您可以阅读有关使用此工具的@dnolen建议 如何调试ClojureScript

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top