【问题标题】:figwheel build can't find my core cljs namespacefigwheel build 找不到我的核心 cljs 命名空间
【发布时间】:2015-05-30 20:07:44
【问题描述】:

我正在尝试为我的项目使用 figwheel build。我使用最新版本的库,我的 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 build 似乎找不到我的核心命名空间:

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 项目来演示这个问题 here:

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

【问题讨论】:

    标签: clojure clojurescript leiningen figwheel


    【解决方案1】:

    问题是命名空间,应该是:

    :main myproject.core
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-29
      • 1970-01-01
      相关资源
      最近更新 更多