0

I'm working to learn Clojure and Clojurescript; currently going through the book Living Clojure.

I'm having trouble getting ClojureScript to compile ... I just put up the example as specified in the book:

(ns cheshire-cat.core)

(defn ^:export init []
  (js/alert "hi"))

I tried the book suggestion to run the compiler

lein cljsbuild auto

But I get this error:

Compiling ClojureScript.
Syntax error macroexpanding clojure.core/ns at (cljsbuild/crossover.clj:1:1).
import - failed: #{:refer-clojure} at: [:ns-clauses :refer-clojure :clause] spec: :clojure.core.specs.alpha/ns-refer-clojure
import - failed: #{:require} at: [:ns-clauses :require :clause] spec: :clojure.core.specs.alpha/ns-require
import - failed: #{:import} at: [:ns-clauses :import :clause] spec: :clojure.core.specs.alpha/ns-import
import - failed: #{:use} at: [:ns-clauses :use :clause] spec: :clojure.core.specs.alpha/ns-use
import - failed: #{:refer} at: [:ns-clauses :refer :clause] spec: :clojure.core.specs.alpha/ns-refer
import - failed: #{:load} at: [:ns-clauses :load :clause] spec: :clojure.core.specs.alpha/ns-load
import - failed: #{:gen-class} at: [:ns-clauses :gen-class :clause] spec: :clojure.core.specs.alpha/ns-gen-class

Full report at:
/tmp/clojure-3119149998558661227.edn

Help please? I've been working with Clojure for a few weeks but just starting ClojureScript.

1
  • 1
    The error says that it's in crossover.clj, but the file that you show should be src/cheshire_cat/core.cljs Commented Nov 26, 2020 at 18:52

1 Answer 1

1

Your issue was fixed in here

https://github.com/emezeske/lein-cljsbuild/commit/3d4d8d8f89f140e6b28aa8ce995c44743e4c6cf3

You should bump your cljsbuild to 1.1.8 or downgrade your clojure to 1.8.0

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.