我开始使用clojurescript并将lein-cljsbuild添加到我的project.clj:
(defproject hello-world "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojure/clojurescript "0.0-1450"]]
:plugins [[lein-cljsbuild "1.0.3"]]
:cljsbuild {:builds []})
当我在PowerShell和命令窗口中运行以下命令时:
lein trampoline cljsbuild repl-rhino
我一直收到以下错误:
(Retrieving cljsbuild/cljsbuild/0.2.7/cljsbuild-0.2.7.jar from clojars)
Exception in thread "main" org.mozilla.javascript.EcmaError: ReferenceError: "goog" is not defined. (bootjs#1),
compiling:(C:\Users\Karthik\AppData\Local\Temp\form-init8943880809592678534.clj:1:127)
我还需要做什么?上面的步骤在 ClojureScript:Up and Running 一书中有所概述,但对于lein-cljsbuild" 0.2.7"
答案 0 :(得分:5)
以下版本适用于我:
(defproject hello-world "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-2173"]]
:plugins [[lein-cljsbuild "1.0.2"]]
:cljsbuild {
:builds []})
更新到lein-cljsbuild 1.0.3
和clojurescript 0.0-2197
似乎打破了rhino repl。