I recently updated some dependency versions in a project of mine and ran
into a clojurescript compiling problem (via lein cljsbuild):

Compiling ClojureScript...
Compiling "resources/public/js/main.js" from ["cljs"]...
Compiling "resources/public/js/main.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:cljs/foo/core.cljs {:file
#object[java.io.File 0x239bc43f "cljs/foo/core.cljs"]}
        at clojure.core$ex_info.invokeStatic(core.clj:4617)
        at clojure.core$ex_info.invoke(core.clj:4617)
        at cljs.compiler$compile_file$fn__3346.invoke(compiler.cljc:1386)
        ....
Caused by: clojure.lang.ExceptionInfo: No such namespace:
cljs.tools.reader.edn, could not locate cljs/tools/reader/edn.cljs,
cljs/tools/reader/edn.cljc, or Closure namespace "cljs.tools.reader.edn" in
file
file:/home/me/.m2/repository/com/taoensso/encore/2.67.1/encore-2.67.1.jar!/taoensso/encore.cljs
{:tag :cljs/analysis-error}
        at clojure.core$ex_info.invokeStatic(core.clj:4617)
        at clojure.core$ex_info.invoke(core.clj:4617)
        ....

Here is the entirety (2 lines) of my clojurescript code:

(ns foo.core
  (:require [taoensso.sente :as sente]))

And here's the relevant section of my project.clj:

(defproject foo "0.0.1-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [ring/ring-core "1.5.0"]
                 [com.taoensso/sente "1.10.0"]
                 [org.clojure/clojurescript "1.9.93"]
                ]
  :source-paths ["clj"]
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}}
  :plugins [[lein-cljsbuild "1.1.3"]]
  ...

I did a lein deps :tree and each dependency that used
org.clojure/tools.reader was using a more recent version such as 0.10.0 and
1.0.0-beta2 except for ring/ring-core which is still using 1.5.0.

RESOLUTION:
I excluded the dependency of org.clojure/tools.reader for ring/ring-core
and that took care of the compile problem.

(in project.clj:)
...
[ring/ring-core "1.5.0" :exclusions [org.clojure/tools.reader]]
...

Because I hadn't run into this problem before it cost me a few hours.
Maybe documenting this can save time for someone else.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to