Skip to content

Commit

Permalink
Add Gotchas section to README
Browse files Browse the repository at this point in the history
Identified a gotcha which I am sure will come up again so I figured I
would at the least provide a starting point to help future users debug
  • Loading branch information
athomasoriginal committed May 21, 2019
1 parent 4231d23 commit 6b0203d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# Deploy ClojureScript to Github Pages

This repo contains demo code for [Blog Post](https://github.com/tkjone/blog/blob/master/src/pages/blog-posts/000-deploy-clojurescript-to-github-pages.md). Live site [here](https://tkjone.github.io/demo-clojurescript-gh-pages/)

## Gotchas

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

```bash
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:

```bash
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.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.

0 comments on commit 6b0203d

Please sign in to comment.