Reputation: 467
I am trying to run a simple ClojureScript hello world program using instructions from the ClojureScript QuickStart page, but when I run the command clj -M --main cljs.main --compile hello-world.core --repl
(in the hello-world project folder), I am getting this error : Error building classpath. Error reading edn. Invalid number: 1.10.758 (/some_path_to_/deps.edn)
.
The ClojureScript code is:
(ns hello-world.core)
(println "Hello world!")
and the deps.edn
file contains:
{:deps {org.clojure/clojurescript {:mvn/version 1.10.758}}}
How do I get rid of this error?
Upvotes: 0
Views: 250
Reputation: 29958
You need double-quotes around the version number. Sample file:
{:deps {
org.clojure/clojure {:mvn/version "1.10.2-alpha1"}
org.clojure/clojurescript {:mvn/version "1.10.764"}
com.bhauman/figwheel-main {:mvn/version "0.2.11"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
re-frame {:mvn/version "1.0.0"}
reagent {:mvn/version "0.10.0"}
reagent-utils {:mvn/version "0.3.3"}
org.clojure/spec.alpha {:mvn/version "0.2.176"}
prismatic/schema {:mvn/version "1.1.12"}
tupelo {:mvn/version "20.07.21"}
}
:paths ["src" "test" "target" "resources"]
:aliases {
:ancient {:main-opts ["-m" "deps-ancient.deps-ancient"]
:extra-deps {deps-ancient {:mvn/version "RELEASE"}}}
:fig {:main-opts ["-m" "figwheel.main"]}
:dev {:main-opts ["-m" "figwheel.main" "--build" "dev" "--repl"]
; :extra-deps {tupelo {:local/root "/Users/r634165/tupelo/target/uberjar/tupelo-0.9.XXXXX-standalone.jar"}}
}
}
}
I have not used CLJS recently, but the above shows the proper form.
Upvotes: 2