Deploy ClojureScript to Github Pages
For people who are working through the blog post this demo was written for, there are some issues you might run into. Hopefully this section will help to understand and resolve them.
dev bundle command returns exception: Could not locate cljs/main__init.class
If you ran this command
clj -m cljs.main -d "demo-clojurescript-gh-pages/out" -c demo.static-website -r
You could see an exception like this in your terminal:
Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/main__init.class, cljs/main.clj or cljs/main.cljc on classpath.
The above command generally means that
clojure could not find
ClojureScript. Here are some of the reasons why it might occur and how to resolve the issue:
You might be running the command from the wrong dir
Please be sure that you are running the dev bundle command from the root of the project dir and you have a
deps.ednfile living there.
You might not have ClojureScript installed
The first time you run the command from the correct dir, it should download ClojureScript from maven. However, there are scenarios where
cljwon't try to download ClojureScript. For example, if
.cpcachedir, it will not try to download
ClojureScriptagain and alway return the above exception.