leincljs构建错误:java.lang.IllegalStateException

时间:2015-08-20 19:57:12

标签: clojure clojurescript

我刚刚在我的lein项目目录中运行lein cljsbuild once,我收到错误java.lang.IllegalStateException : Can't dynamically bind non-dynamic var: clojure.tools.reader/resolve-symbol

堆栈跟踪:

https://gist.githubusercontent.com/fyquah95/0a02b06c0a9aa2225f9c/raw/0cc05629a18c3711e27b1fc9dd59db0532d964b8/gistfile1.txt

我的project.clj文件:

(defproject barclays-cycle-hire-stats "0.1.0-SNAPSHOT"                                                                                                                               
  :description "FIXME: write description"                                                                                                                                            
  :url "http://example.com/FIXME"                                                                                                                                                    
  :license {:name "Eclipse Public License"                                                                                                                                           
            :url "http://www.eclipse.org/legal/epl-v10.html"}                                                                                                                        
  :main barclays-cycle-hire-stats.core                                                                                                                                               
  :plugins [[lein-cljsbuild "1.0.6"]                                                                                                                                                 
            [lein-ring "0.8.7"]]                                                                                                                                                     
  :source-paths ["src/clj"]                                                                                                                                                          
  :cljsbuild {                                                                                                                                                                       
    :builds [{:source-paths ["src/cljs"]                                                                                                                                             
              :compiler {:output-to "resources/public/js/main.js"                                                                                                                    
                         :optimizations :whitespace                                                                                                                                  
                         :pretty-print true}}]}                                                                                                                                      
  :dependencies [[http-kit "2.1.18"]                                                                                                                                                 
                 [reagent "0.5.1-rc"]                                                                                                                                                
                 [cljs-ajax "0.3.14"]                                                                                                                                                
                 [compojure "1.1.6"]                                                                                                                                                 
                 [hiccup "1.0.4"]                                                                                                                                                    
                 [org.clojure/math.numeric-tower "0.0.4"]                                                                                                                            
                 ; [org.clojure/clojure.core.async "0.1.346.0-17112a-alpha"]                                                                                                         
                 [spyscope "0.1.5"]                                                                                                                                                  
                 [org.clojure/math.combinatorics "0.1.1"]                                                                                                                            
                 [org.clojure/data.json "0.2.6"]                                                                                                                                     
                 [org.clojure/clojure "1.7.0"]                                                                                                                                       
                 [org.clojure/clojurescript "1.7.48" :exclusion [org.clojure/data.json]]                                                                                             
                 [org.clojure/data.csv "0.1.3"]]                                                                                                                                     
  :eval-in-leiningen true                                                                                                                                                            
  :ring {:handler barclays-cycle-hire-stats.routes/app})

2 个答案:

答案 0 :(得分:1)

尝试不使用:eval-in-leiningen true

:eval-in-leiningen适用于插件,在项目中使用时会出现奇怪的错误。

您可以在leiningen.core doc的Project isolation部分和leiningen的Plugins doc

中找到有关:eval-in-leiningen:eval-in-project的信息。

答案 1 :(得分:0)

添加:排除[org.apache.ant / ant]到clojurescript依赖项为我修复了相同的错误消息。所以它看起来像这样:

[org.clojure/clojurescript "1.7.48" :exclusions [org.apache.ant/ant]]