Skip to content
An example clojurescript site hosted on Github pages
CSS HTML Clojure
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Deploy ClojureScript to Github Pages

This repo contains demo code for Blog Post. Live site here


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" 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.edn file 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 clj won't try to download ClojureScript. For example, if clj sees a .cpcache dir, it will not try to download ClojureScript again and alway return the above exception.

You can’t perform that action at this time.