I am trying to 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.
The best way to use Figwheel for the past year is not with Leiningen, but with the Clojure
deps.ednsystem.Full details are on the Figwheel-Main website: https://figwheel.org/
Work through the tutorial.
For using Cursive, I first create the project directory & files, and then add it to Cursive/IntelliJ via:
For a Clojure 'lein' based project, I click on the file
project.clj. For a ClojureScript 'deps' based project, you could click ondeps.edn, or just the parent directory (I haven't experimented creating CLJS projects).