This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-18
Channels
- # announcements (43)
- # aws (28)
- # babashka (32)
- # beginners (80)
- # calva (13)
- # chlorine-clover (2)
- # cider (11)
- # clj-kondo (15)
- # cljs-dev (1)
- # clojure (151)
- # clojure-dev (11)
- # clojure-europe (11)
- # clojure-italy (3)
- # clojure-losangeles (3)
- # clojure-nl (4)
- # clojure-spec (20)
- # clojure-uk (58)
- # clojured (3)
- # clojuredesign-podcast (2)
- # clojurescript (37)
- # core-async (4)
- # core-typed (1)
- # cursive (53)
- # datascript (5)
- # datomic (26)
- # duct (23)
- # emacs (3)
- # fulcro (22)
- # graalvm (1)
- # jobs (2)
- # joker (11)
- # juxt (24)
- # lumo (1)
- # mid-cities-meetup (2)
- # nyc (1)
- # off-topic (54)
- # parinfer (1)
- # reagent (13)
- # shadow-cljs (16)
- # sql (9)
- # tree-sitter (9)
- # vim (9)
Every time I run shadow-cljs watch app unit-tests
I get these warnings in the JS console:
DevTools failed to parse SourceMap:
DevTools failed to parse SourceMap:
...
DevTools failed to parse SourceMap:
DevTools failed to parse SourceMap:
DevTools failed to parse SourceMap:
The same problem was there before I made the unit-tests build, so I’m wondering why this even shows up. There is otherwise no mention of devtools in my setup.
shadow-cljs.edn:
{:deps {:aliases [:shadow-cljs :testing]}
:dev-http {8000 "classpath:public"}
:nrepl {:port 9000
:init-ns dev}
:builds {:app {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "js"
:modules {:main {:init-fn user/start-dev}}}
:unit-tests {:target :browser-test
:test-dir "resources/public/js/test"
:devtools {:http-port 8001
:http-root "resources/public/js/test"}}}}
deps.edn
{:paths ["src" "resources"]
:deps {org.clojure/clojurescript {:mvn/version "1.10.597"}
reagent {:mvn/version "0.9.1"}
hickory {:mvn/version "0.7.1"}}
:aliases {:testing {:extra-paths ["test"]}
:shadow-cljs {:extra-paths ["dev/src"]
:extra-deps {thheller/shadow-cljs {:mvn/version "2.8.83"}}}}}
Removing the portion with :devtools in shadow-cljs.edn
or simply only running the app build, just breaks the unit-tests build and doesn’t mute the warnings anyway.
There is one more piece of information which is that I tried to set up a binaryage/devtools preload at some point, but didn’t commit to it and removed it again. I can’t remember if this issue was present before then or not, but is it possible that shadow-cljs has cached something along the way there?
@simongray looks like your paths are incorrect? you have :output-dir "resources/public/js/compiled"
and classpath:public
meaning that the files are accessed via /js/compiled/...
but you have :asset-path "js"
which likely should be /js/compiled
if you have any kind of client side routing
i'm trying to require some CLJC macros in my browser-targeting CLJS tests so that i can run some hacky code at compile time. i'm using shadow-cljs for my test builds, and i'm getting a build error without a stack trace; it just says Error in phase :compilation
.
ah, i found this post. i'll try reading this first: https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html
do source maps work with exceptions on react native? They seem to work with console logging, but not for stack traces