I have spent almost 2 days trying to get to the stage where I can render some html
in the browser using ClojureScript, but am not very close.
So far I have installed: Clojure, leiningen, Figwheel, IntelliJ, Cursive. I would like to use reagent and re-frame. I have tried Chestnut (this is the closest I have come to seeing rendered html). I am not sure if I need anything else.
What I would like to achieve is to use all of these tools as my environment and start creating a web app.
Figwheel seems to be the main problem.
Where I've currently got to: Created a Clojure project with IntelliJ and Cursive. I am following this article to try and get up and running - I've got to the point where it says Start Figwheel from the terminal (lein figwheel)
. When I do, the terminal in IntelliJ prints
Exception in thread "main" java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)
.
When I google this error, a the solution is to add this line to the project.clj
:
:jvm-opts ["--add-modules" "java.xml.bind"]
Then I run lein figwheel
in the terminal again and this time I get:
java.lang.module.FindException: Module java.xml.bind not found
Then I got to IntelliJ > File > Project Structure > Platform SDKs and change the SDK path to 1.8. I have tried 12 and 8. Nothing works.
Am I close? How can I move on? I've done the getting started tutorials but they just focus on REPLs and not a full on web development environment etc. Many thanks.