reagent-project / reagent-template

A Leiningen template for projects using Reagent.
MIT License
394 stars 55 forks source link

Pushing a new lein new reagent project to Heroku fails #80

Closed AlexAti closed 8 years ago

AlexAti commented 8 years ago

Hi,

Just created a new project and pushing to heroku fails:

... remote: Retrieving cljsbuild/cljsbuild/1.0.6/cljsbuild-1.0.6.jar from clojars remote: Retrieving clj-stacktrace/clj-stacktrace/0.2.5/clj-stacktrace-0.2.5.jar from clojars remote: Compiling "resources/public/js/app.js" from ("src/cljs" "src/cljc" "env/prod/cljs" "env/prod/cljs")... remote: Compiling "resources/public/js/app.js" failed. remote: java.io.FileNotFoundException: src/cljc (No such file or directory) remote: at java.io.FileInputStream.open0(Native Method) remote: at java.io.FileInputStream.open(FileInputStream.java:195) ...

I've just added core.logic to the template, so basically nothing changed (here is my repo).

Uberjar, run or figwheel run fine in local. Perhaps somewhere in the build instructions it is assumed that the folder already exists, which might be true on my machine but not so in heroku?

AlexAti commented 8 years ago

So, initially, the folder src/cljc is empty. I've created a file with an empty namespace and the problem does not appear. I'd suggest trying to locate why this happens, or alternatively (worse solution in my opinion), add an empty .cljc namespace in src/cljc.

yogthos commented 8 years ago

I think the issue is that Git ignores empty folders, so the empty cljc folder never gets checked in. Since the compiler expects it, everything breaks on Heroku. I think putting a dummy namespace is a reasonable enough solution. Just pushed out a new template with the fix.

AlexAti commented 8 years ago

Ok, I'll close the issue then!