我没有看到任何编译日志文件,终端中的错误不足以让我进一步排除故障。我如何获得更详细的错误记录,或者我应该如何解决这个问题?
下面的堆栈跟踪的前几行
Compiling ClojureScript...
Compiling ["resources/public/js/app.js"] from ["src/cljs"]...
Compiling ["resources/public/js/app.js"] failed.
clojure.lang.ExceptionInfo: failed compiling file:resources\public\js\out\cljs\core.cljs {:file #object[java.io.File 0x7c5d1d25 "resources\\public\\js\\out\\cljs\\core.cljs"], :clojure.error/phase :compilation}
at cljs.compiler$compile_file$fn__3901.invoke(compiler.cljc:1706)
at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1666)
我有一个简单的 cljs 文件,内容如下
(ns moose.core)
(defn run []
(.write js/document "This is not the end!"))
我的 project.clj 具有以下 cljsbuild 配置
:cljsbuild
{:builds [{:id "dev"
:source-paths ["src/cljs"]
:figwheel {:on-jsload "moose.core/run"
:open-urls ["http://localhost:3449/index.html"]}
:jar true
:compiler {:main moose.core
:warnings true
:output-dir "resources/public/js/out"
:asset-path "js/out"
:output-to "resources/public/js/app.js"}}]}
:clean-targets ^{:protect false} [:target-path :compile-path "resources/public/js" "dev-target"]
更新 1 按照 Alan 在下面的建议,我创建了一个新模板并缩小了原因,以添加一个相当旧的库来与 CouchDB 交互
问题仍然是如何获取 cljsbuild 的详细/完整日志。
更新 2 原来库在依赖项列表中的位置会产生影响。如果它出现在 [com.cognitect/transit-clj "0.8.313"]之前编译失败,否则它可以工作。