hi there - I have trouble compiling my project with figwheel, when I include devtools.core
I can compile with lein cljsbuild once dev
, but running lein figwheel
gives me the following error:
ANALYSIS ERROR: java.io.FileNotFoundException: Could not locate environ/core__init.class or environ/core.clj on classpath., compiling:(devtools/dirac.clj:1:1) on file null, line null, column null
clojure.lang.ExceptionInfo: Error in component :figwheel-system in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key :figwheel-system, :component #figwheel_sidecar.system.FigwheelSystem{:system #object[clojure.lang.Atom 0x6f45a719 {:status :ready, :val #<SystemMap>}]}, :system #<SystemMap>}
at clojure.core$ex_info.invoke(core.clj:4593)
…
If I remove everything related to requirering and starting devtools from my .core
namespace, it works again
hmm
looks like the envrion dependency is not avail
it is declared here in cljs-devtools project: https://github.com/binaryage/cljs-devtools/blob/master/project.clj#L13
maybe that scope “provided” is wrong?
actually I tried including it explicitly, and that is currently what makes my lein cljsbuild once
work
if I remove it, it doesn’t compile. however figwheel doesn’t compile no matter
does cljs-devtools-sample work for you?
i haven’t tried it yet, i’ll check it out
oh - btw, finding PageUp/PageDown was a mystery on my macbook, might want to make some buttons or write that it’s fn+arrows
on macbooks 😉
aha :simple_smile:
(if you’re the maintainer, that is :simple_smile:
good point
I have just cloned cleanly cljs-devtools-sample and did lein demo
and it works for me
try to spot any differences between that project and your project.clj
it is difficult for me to give you some better diagnostics
will be back in 20mins
just seems the sample is depending explicitly on environ. if I depend on it explicitly, it works for me, both with cljsbuild and figwheel.
I thought there was a diff between figwheel and cljsbuild compilation at first, but I wasn’t doing lein clean
inbetween trials
so I guess cljs-devtools should just refer to environ itself
https://github.com/binaryage/cljs-devtools/blob/master/project.clj#L13
don’t know if the :provided
option is causing the problem
(i’m a beginner when it comes to dependencies)