Fork me on GitHub
#figwheel-main
<
2019-10-14
>
mhuebert13:10:22

How would one print detailed compile errors? I’m seeing [Figwheel:WARNING] Could not Compile: Call to clojure.core/defn did not conform to spec. /path/to/file.cljs but can’t seem to find any more details

mhuebert13:10:24

hm. I didn’t figure out how to find the logs, but did find that the error wasn’t in the file that was printed, but rather in a clj file referenced by the cljs file

kah0ona14:10:39

Hello friends, Somehow I get served (against expectations) the Figwheel Default Dev Page, whilst I serve an index.html (albeit dynamically from compojure, but that works in a different project too)

kah0ona14:10:17

I checked out the figwheel-main code, and I see that this page is inserted here if this holds: https://github.com/bhauman/figwheel-main/blob/b5b21d53dbafeef740175161010496da841f1625/src/figwheel/main.cljc#L1844

kah0ona14:10:38

ie., if on that path in the config there ’s nothing, it inserts that. question is, why isn’t there anything? I use M-x cider-jack-in-clj&cljs, this works in a different project with roughly the same deps, but somehow not here

kah0ona14:10:59

(update-in
          cfg
          [:repl-env-options
           :ring-stack-options
           :figwheel.server.ring/dev
           :figwheel.server.ring/system-app-handler]
          (fn [sah]
            (if sah
              sah
              #(-> %
                   (helper/extra-main-hosting extra-mains-name->output-to)
                   (helper/missing-index
                    (if (and (:modules options)
                             (:output-dir options))
                      {:output-to (str (io/file (:output-dir options) "cljs_base.js"))}
                      (select-keys (:options cfg) [:output-to])))))))))
`

kah0ona14:10:56

any insights would be greatly appreciated

kah0ona14:10:13

it’s a Ring stack, with ring 1.7.1

kah0ona14:10:10

in the logs I do see that the ring server is started, ie. i see the handler being called, but somehow this middleware is inserted

kah0ona14:10:05

which prevents showing my index, and it shows the default figwheel dev page instead… 😞

kah0ona15:10:49

I’m using figwheel-0.2.1-SNAPSHOT, have tried others to no avail