lein-figwheel
lein-figwheel copied to clipboard
ClassNotFoundException using :preloads
Trying to use the :preloads
key (based off the project.clj
and env.all
in this repo: https://github.com/areina/elfeed-cljsrn/blob/master/project.clj#L46), but hitting some issues, either locally or on CircleCI.
Using ['env.all]
, I can get circle ci to preload the file and run the tests successfully, but I get a figwheel compilation error when trying to start figwheel locally:
The Vector at (:cljsbuild :builds 2 :compiler :preloads) contains a non-conforming value:
'env.all
It should be a Symbol
{:cljsbuild {:builds [{:compiler {:preloads ['env.all
^---- The value at key 0 doesn't conform]}}]}}
If I remove the quote and change it to [env.all]
, I'm able to start figwheel locally without any errors, but the circle ci build fails with the following stacktrace:
Exception in thread "main" java.lang.ClassNotFoundException: env.all, compiling:(/tmp/form-init1968605917679096161.clj:1:227)
at clojure.lang.Compiler.analyze(Compiler.java:6792)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$VectorExpr.parse(Compiler.java:3253)
at clojure.lang.Compiler.analyze(Compiler.java:6775)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$MapExpr.parse(Compiler.java:3097)
at clojure.lang.Compiler.analyze(Compiler.java:6781)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6991)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2307)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.eval(Compiler.java:7059)
at clojure.lang.Compiler.eval(Compiler.java:7052)
at clojure.lang.Compiler.load(Compiler.java:7514)
at clojure.lang.Compiler.loadFile(Compiler.java:7452)
at clojure.main$load_script.invokeStatic(main.clj:278)
at clojure.main$init_opt.invokeStatic(main.clj:280)
at clojure.main$init_opt.invoke(main.clj:280)
at clojure.main$initialize.invokeStatic(main.clj:311)
at clojure.main$null_opt.invokeStatic(main.clj:345)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.invokeStatic(main.clj:424)
at clojure.main$main.doInvoke(main.clj:387)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: env.all
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2204)
at clojure.lang.RT.classForName(RT.java:2213)
at clojure.lang.Compiler.resolveIn(Compiler.java:7280)
at clojure.lang.Compiler.resolve(Compiler.java:7243)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7204)
at clojure.lang.Compiler.analyze(Compiler.java:6752)
... 46 more
Any idea how to fix this?
This is a common mistake you can't quote things in a project.clj, you must leave the quote offf
On Thu, Mar 1, 2018 at 11:32 PM, jlo1 [email protected] wrote:
Trying to use the :preloads key (based off the project.clj and env.all in this repo: https://github.com/areina/elfeed-cljsrn/blob/master/ project.clj#L46), but hitting some issues.
Using ['env.all], I can get circle ci to run the tests successfully, but I get a figwheel compilation error when trying to start figwheel locally:
The Vector at (:cljsbuild :builds 2 :compiler :preloads) contains a non-conforming value: 'env.all It should be a Symbol
{:cljsbuild {:builds [{:compiler {:preloads ['env.all ^---- The value at key 0 doesn't conform]}}]}}
If I change it to [env.all], I can start figwheel locally, but the test fails when running on circle ci with the following stacktrace:
Exception in thread "main" java.lang.ClassNotFoundException: env.all, compiling:(/tmp/form-init1968605917679096161.clj:1:227) at clojure.lang.Compiler.analyze(Compiler.java:6792) at clojure.lang.Compiler.analyze(Compiler.java:6729) at clojure.lang.Compiler$VectorExpr.parse(Compiler.java:3253) at clojure.lang.Compiler.analyze(Compiler.java:6775) at clojure.lang.Compiler.analyze(Compiler.java:6729) at clojure.lang.Compiler$MapExpr.parse(Compiler.java:3097) at clojure.lang.Compiler.analyze(Compiler.java:6781) at clojure.lang.Compiler.analyze(Compiler.java:6729) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005) at clojure.lang.Compiler.analyze(Compiler.java:6773) at clojure.lang.Compiler.access$300(Compiler.java:38) at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003) at clojure.lang.Compiler.analyze(Compiler.java:6773) at clojure.lang.Compiler.analyzeSeq(Compiler.java:6991) at clojure.lang.Compiler.analyze(Compiler.java:6773) at clojure.lang.Compiler.analyze(Compiler.java:6729) at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003) at clojure.lang.Compiler.analyze(Compiler.java:6773) at clojure.lang.Compiler.analyze(Compiler.java:6729) at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100) at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2307) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003) at clojure.lang.Compiler.analyze(Compiler.java:6773) at clojure.lang.Compiler.analyze(Compiler.java:6729) at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100) at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460) at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001) at clojure.lang.Compiler.analyze(Compiler.java:6773) at clojure.lang.Compiler.eval(Compiler.java:7059) at clojure.lang.Compiler.eval(Compiler.java:7052) at clojure.lang.Compiler.load(Compiler.java:7514) at clojure.lang.Compiler.loadFile(Compiler.java:7452) at clojure.main$load_script.invokeStatic(main.clj:278) at clojure.main$init_opt.invokeStatic(main.clj:280) at clojure.main$init_opt.invoke(main.clj:280) at clojure.main$initialize.invokeStatic(main.clj:311) at clojure.main$null_opt.invokeStatic(main.clj:345) at clojure.main$null_opt.invoke(main.clj:342) at clojure.main$main.invokeStatic(main.clj:424) at clojure.main$main.doInvoke(main.clj:387) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.lang.Var.applyTo(Var.java:702) at clojure.main.main(main.java:37) Caused by: java.lang.ClassNotFoundException: env.all at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at clojure.lang.RT.classForName(RT.java:2204) at clojure.lang.RT.classForName(RT.java:2213) at clojure.lang.Compiler.resolveIn(Compiler.java:7280) at clojure.lang.Compiler.resolve(Compiler.java:7243) at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7204) at clojure.lang.Compiler.analyze(Compiler.java:6752) ... 46 more
Any idea how to fix this?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bhauman/lein-figwheel/issues/660, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAKQLg8rIWDcR4xX5XTCfE2F6JzZt_jks5taMtxgaJpZM4SZY3b .
Thanks for the response @bhauman! Leaving the quote off however results in the ClassNotFoundException
(stacktrace is pasted above). Any idea how to workaround that?
That stacktrace is saying that env.all
doesn't exist. But for questions
like this you should head over to the Clojurians slack.
On Fri, Mar 2, 2018 at 2:27 PM, jlo1 [email protected] wrote:
Thanks for the response @bhauman https://github.com/bhauman! Leaving the quote off however results in the ClassNotFoundException (stacktrace is pasted above). Any idea how to workaround that?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bhauman/lein-figwheel/issues/660#issuecomment-370026797, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAKQEzgw9XGP-35f32p-2BGzAl90HTAks5taZ0QgaJpZM4SZY3b .