gpt4 book ai didi

clojure - 引用错误 : "goog" is not defined when running lein cljsbuild

转载 作者:行者123 更新时间:2023-12-05 01:03:41 27 4
gpt4 key购买 nike

我开始使用 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"

最佳答案

以下版本对我有用:

(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.3clojurescript 0.0-2197似乎打破了犀牛repl。

关于clojure - 引用错误 : "goog" is not defined when running lein cljsbuild,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24393603/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com