Tuesday, October 30, 2018

More yak shaving in clojure

I got a fresh clone of my luminus project from version control and got this error:

Exception in thread "main" java.lang.RuntimeException: could not start [#'track-work.config/env] due to, compiling:(/tmp/form-init1269791463497202877.clj:1:73)
 at clojure.lang.Compiler.load(Compiler.java:7526)
 ... more
Caused by: java.lang.RuntimeException: could not start [#'track-work.config/env] due to
 at mount.core$up$fn__297.invoke(core.cljc:94)
 ... 28 more
Caused by: java.lang.RuntimeException: could not find a non empty configuration file to load. looked in the classpath (as a "resource") and on a file system via "conf" system property
 at cprop.core$load_config.invokeStatic(core.cljc:24)

 ... 34 more

could not find a non empty configuration file to load. is a strange way to say it could not find my config file.

lein is looking for my dev-config.edn which was never added to version control. The test-config.edn and dev-config.edn are automatically added to the .gitignore by the template.

I ran the lein template again to get a fresh copy of the dev-config.edn and test-config.edn


lein new luminus myproject +re-frame +postgres
Then used the files to create a bash script that will make a dev-config-sample.edn and test-config-sample.edn in case this ever happens again. Maybe there is a way to ask luminus to generate the files for you again.

No comments:

Post a Comment