This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-15
Channels
- # announcements (8)
- # asami (10)
- # babashka (16)
- # beginners (86)
- # calva (22)
- # chlorine-clover (9)
- # circleci (20)
- # clj-kondo (13)
- # cljs-dev (20)
- # cljsrn (3)
- # clojure (144)
- # clojure-australia (10)
- # clojure-europe (126)
- # clojure-italy (5)
- # clojure-nl (8)
- # clojure-norway (4)
- # clojure-serbia (9)
- # clojure-uk (7)
- # clojurescript (14)
- # cursive (20)
- # data-science (1)
- # datomic (20)
- # figwheel-main (5)
- # fulcro (23)
- # graalvm (7)
- # graphql (25)
- # honeysql (15)
- # hugsql (3)
- # jobs (2)
- # lambdaisland (2)
- # leiningen (4)
- # lsp (102)
- # malli (3)
- # off-topic (51)
- # overtone (5)
- # pathom (27)
- # portal (11)
- # quil (1)
- # re-frame (19)
- # reagent (31)
- # remote-jobs (1)
- # reveal (3)
- # rewrite-clj (56)
- # shadow-cljs (45)
- # startup-in-a-month (1)
- # tools-deps (9)
How can I check which dependency includes cljs.test and cljs.pprint? I can see in shadow-report both of those included, whereas I don't have explicit require for them in the application.
you can technically reconstruct it from the build data but no readymade function currently
Hmm.. I think the fastest way would be to stub cljs.pprint with some ns which includes throw of an error and check stacktrace. Will check it out
If you wondering how to setup devcards with shadow-cljs here is an example: https://github.com/jacekschae/shadow-cljs-devcards also created a PR to add to the examples
So I have some code that compiles fine in shadow-cljs, but gives me the following error when I try to load it in the browser:
SyntaxError: Invalid or unexpected token
at eval (<anonymous>)
at Object.goog.globalEval ()
at Object.env.evalLoad ()
at
The error doesn't really tell me where the problem lies, and the compiled js file being loaded is >4000 lines. How can I figure out what's causing the error?Like, is there a way to eval the statements in the file one by one?
the only way I have seen this error before is when two shadow-cljs instances are running at the same time and writing to the same files
I did do that yesterday
how do I clean this up? should deleting the output directory suffice?
yeah there are zero instances right now :)
and you only have one build writing to the output-dir? and no other processes modifying that output in any way?
but like I said, I had two earlier
restarting will recreate all the files properly but if you want you can clean out the output-dir as well
alright
I did restart a few times afterwards, so maybe something else is going on here
yeah it does tell me, but it's not helpful because that file is huge
yeah no, still fails
I'll try the loader-mode thing next
shadow-cljs
alright, :loader-mode :script
gave me a much nicer error, albeit in a different file...
I'll try to solve that one and see if I can get to the other thing that was failing 🙂
:script
will not abort loading if one file fails. so it likely just creates a cascade of other errors
oh wait, duh
yeah, the original error is there — I just missed it
it's telling me which line is failing now though
it's a bad regex
thanks for the help!
BTW, is there a way to get something like lein checkouts with shadow-cljs?
right now my workflow when working on cljs/cljc libraries with my cljs project is basically 1. make a change to a library 2. quit shadow-cljs 3. reinstall the library to my local maven repo 4. start shadow-cljs again 5. find something I want to change, go back to 1
...which seems pretty far from optimal 🙂
huh 🙂 I didn't realize I could use lein and shadow-cljs together
very cool