0

プロジェクトに figwheel ビルドを使用しようとしています。私は最新バージョンのライブラリを使用しており、leiningen のバージョンは 2.5.1 です。私のビルドファイルは次のようになります。

(defproject figwheel-issue "1.2.3"
  :plugins [[lein-cljsbuild "1.0.6"]
            [lein-figwheel "0.3.3"]]
  :dependencies [[org.clojure/clojurescript "0.0-3269"]
                 [org.clojure/clojure "1.7.0-beta3"]]
  :cljsbuild {
              :builds [{ :id "dev"
                        :source-paths ["src"]
                        :figwheel true
                        :compiler {
                                   :main myproject/core
                                   :hashbang false
                                   :asset-path "js/out"
                                   :output-to "resources/public/js/example.js"
                                   :output-dir "resources/public/js/out"
                                   :optimizations :none}}]})

通常のビルドは問題なく動作します。だから私が実行すると:

lein cljsbuild once

私は得る:

Successfully compiled "resources/public/js/example.js" in 0.873 seconds.

しかし、実行しようとすると:

lein figwheel

Figwheel ビルドが私のコア名前空間を見つけられないようです:

Compiling "resources/public/js/example.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:target/figwheel_temp/dev/figwheel/connect.cljs
 at clojure.core$ex_info.invoke (core.clj:4591)
Caused by: clojure.lang.ExceptionInfo: No such namespace: core, could not locate core.cljs, core.cljc, or Closure namespace "core" at line 1 target/figwheel_temp/dev/figwheel/connect.cljs
 at clojure.core$ex_info.invoke (core.clj:4591)

何が間違っている可能性がありますか?ここで問題を示す最小限の github プロジェクトを作成しました。

https://github.com/auramo/figwheel-build-issue

4

1 に答える 1

1

問題は名前空間でした。次のようにする必要があります。

:main myproject.core
于 2015-05-31T11:40:12.473 に答える