Comments (2)
I had the following bug below while using doo and figwheel.
$ lein clean; lein figwheel
java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Named
at clojure.core$name.invoke (core.clj:1524)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.AFn.applyTo (AFn.java:144)
...
After several hours of leiningen config trial and error, it turns out that Figwheel will specifically error out if it sees :main 'app.core
. Options 2 and 3 will work.
It might help prevent others from spending time debugging if the :main 'app.core
in the README and example config was changed to Option 2 or 3. The error only occurs when specifying :main 'app.core
inside :cljsbuild {:builds {:build-id {:compiler ...} and calling lein figwheel
. All other cljsbuild commands work.
This is my current working project.clj for reference.
(defproject frontend "0.1.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.48"]
[reagent "0.5.1-rc3"]
[re-frame "0.4.1"]
[environ "1.0.0"]
[prismatic/schema "1.0.1"]
[prismatic/plumbing "0.4.4"]
[figwheel "0.4.0"]
[cljs-ajax "0.3.14"]]
:plugins [[lein-environ "1.0.0"]
[lein-figwheel "0.4.0"]
[lein-cljsbuild "1.0.6"]
[lein-doo "0.1.5-SNAPSHOT"]
[codox "0.8.13"]]
:source-paths ["src"]
:codox {:language :clojurescript
:exclude clojure.string}
:profiles {:dev {:env {:dev? true
:cors? true}
:cljsbuild {:builds {:client {:figwheel {:on-jsload "frontend.core/mount-root"}
:compiler {:main "frontend.core"
:source-map true
:source-map-timestamp true
:optimizations :none
:output-dir "resources/public/js/out"
:asset-path "js/out"}}}}}}
:clean-targets ^{:protect false} [:target-path
:compile-path
"resources/public/js"
"../public/frontend-dev"
"../public/frontend-prod"]
:cljsbuild {:builds {:client {:source-paths ["src"]
:compiler {:output-to "resources/public/js/main.js"}}
:browser-test {:source-paths ["src" "test"]
:compiler {:output-to "resources/public/js/browser_tests.js"
:main "frontendtest.browser"
:optimizations :none}}}}
:figwheel {:css-dirs ["resource/public/css"]
:server-port 3333
:repl false})
from doo.
+1 to changing the examples in README.md to something like :main "example.runner"
, would have saved me half an hour of debugging and googling.
@bensu: Any doubts?
from doo.
Related Issues (20)
- doo crashes with Clojure 1.9 HOT 3
- Subprocess fail with phantom on centos 7 HOT 2
- add support for :foreign-libs HOT 1
- WARNING: :preloads should only be specified with :none optimizations
- Test Reporting with Doo HOT 1
- Karma: custom file patterns for static resource loading HOT 7
- Plan for release 0.1.9 HOT 3
- How to prettify test reports in Karma? HOT 2
- Error encountered performing task 'doo' with profile(s): 'dev,test,test' HOT 3
- Tests Fail to Run with Reagent 0.8.0 HOT 4
- Printing test failures with records currently broken HOT 3
- Use spell-spec and expound for better cli errors
- Make sure exit code is zero on unhandled promise rejection in node HOT 1
- junit plugin usage (possibly user error)
- Ability to log the test currently executed
- There is no planck support, despite the README stating it HOT 2
- Issues with testing with Chrome-headless HOT 2
- Error when running Nashorn with `:optimizations :whitespace`
- Consider different method of enabling printing for Node.js
- How do I filter tests?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doo.