luminus-framework / luminus-framework/luminus-template
Luminus template +cljs produces bug in routes.home namespace
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 648
- Forks
- 143
- PR merge metrics
- No merged PRs in 30d
Description
Creating a new luminus project using `lein new luminus new-project +cljs` produces a bug in the `new-project.routes.home` namespace.
When the user runs `lein run` they will get this error:
```
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.(main.java:20)
Caused by: java.lang.RuntimeException: Unable to resolve symbol: ok in this context, compiling:(new_proj/routes/home.clj:12:19)
```
To resolve the error, go into `new-project.routes.home` and make the following change:
```
(defroutes home-routes
(GET "/" [] (home-page))
(GET "/docs" [] (ok (-> "docs/docs.md" io/resource slurp))))
```
Change `ok` to `response/ok`.
I am pretty new to Clojure(Script), but if someone points me in the right direction I can try and fix and submit a PR.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the generated new-project.routes.home namespace and route setup; start by running lein run on a generated +cljs project to reproduce the compile error. Done means the generated project resolves the /docs route through response/ok and lein run no longer reports the unresolved ok symbol.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100