簡體   English   中英

figwheel構建找不到我的核心cljs名稱空間

[英]figwheel build can't find my core cljs namespace

我正在嘗試為我的項目使用figwheel構建。 我使用的是libs的最新版本,而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

問題是名稱空間,應該是:

:main myproject.core

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM