This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-29
Channels
- # announcements (10)
- # babashka (18)
- # beginners (136)
- # calva (9)
- # cider (14)
- # clara (12)
- # clj-kondo (32)
- # cljsrn (3)
- # clojure (133)
- # clojure-europe (21)
- # clojure-nl (4)
- # clojure-uk (15)
- # clojurescript (60)
- # conjure (40)
- # cursive (12)
- # datomic (6)
- # emacs (2)
- # fulcro (19)
- # jackdaw (25)
- # jobs-discuss (3)
- # kaocha (3)
- # leiningen (5)
- # off-topic (99)
- # pedestal (1)
- # re-frame (49)
- # reagent (4)
- # ring (5)
- # rum (5)
- # shadow-cljs (53)
- # spacemacs (2)
- # sql (13)
- # timbre (2)
- # tools-deps (23)
- # vim (11)
- # xtdb (7)
is there a guide for self-hosting settings when using shadow-cljs? (per https://clojurescript.org/guides/self-hosting)
@chris358 there is only this https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html
perfect. thank you.
On the blog post linked above it says:
> Usually shadow-cljs
does not require lein
but it is required in this case since I’m using lein
to build the shadow-cljs
project.
However i don't see lein being invoked.
look at a standalone example. the example I made in the main shadow-cljs repo is not maintained and likely doesn't work anymore
I continue to intermittently get an error like this when starting shadow-cljs:
------ ERROR -------------------------------------------------------------------
File: /home/kenny/compute/monorepo/projects/ui/src/compute/ui/analytics/cloud_acct/view.cljs:44:12
--------------------------------------------------------------------------------
41 | (defn CloudAccountsTable
42 | [{:keys [:integration/type]}]
43 | [table/Table
44 | #::table{:table-class "is-fullwidth"
------------------^-------------------------------------------------------------
No namespace: compute.ui.components.table found
--------------------------------------------------------------------------------
The compute.ui.components.table
namespace is required in the view file references in the above error. The error seems to magically disappear and reappear with no clear way to reproduce it. Previously Thomas thought this was due to a dependency conflict with the reader. Looking at the output from clj -Stree
, I can see org.clojure/tools.reader 1.3.2
is coming directly from thheller/shadow-cljs 2.10.13
. Has anyone else been hitting this? Workarounds? I have not been able to come up with something that will consistently fix the issue.It occurs with anything that uses the namespaced map reader (e.g., #::table
)The only solution I can think of is to not use that anymore. I would think shadow would be compatible with it though.
It started happening several weeks ago when updating to the latest shadow version. Perhaps it's some sort of issue with cljs?
if the namespace has a proper require for the alias table
then race condition shouldn't really happen since that ensures the ns is compiled before
It's quite consistent. 3 other devs on my team have been hitting it. Another "workaround" is to have shadow reload the "problem" namespace (in this case compute.ui.components.table) by creating a trivial change and saving.
Hmm. I've tried for weeks to get a reliable repro. Every time I try, the error magically goes away.
> are you maybe using the embedded variant and use `tools.namespace` in CLJ?
Afaik, no use of tools.namespace.
> or is this running standalone?
We start shadow with npx
.
could there be something in the compute.ui.components.table
namespace preventing it from being parsed?
I don't think so. Changing the keywords from the reader map syntax to regular keywords fixes the issue. The intermittency is also strange.
@U05224H0W Would you like me to open an issue for this?
hello all, how do you use font-end shadow-cljs and back-end in the same port in dev mode? I mean, start shadow-cljs
and something like ring
to provide shadow-cljs
reload?
sorry too tired for this. shadow-cljs produces JS files. it doesn't matter what you use to serve them and your server doesn't need to do anything to "enable" shadow-cljs. just serve static files.
sorry about asking this dumb question, because I came from lein
figwheel
that does all the stuffs for us
@fabrao there are a number of shadow-cljs templates out there - it might be worth looking at how they work and deconstructing them