我试图将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 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:
答案 0 :(得分:1)
问题是命名空间,应该是:
:main myproject.core