Fork me on GitHub

I ran into that exact problem. My solution was to stop using ant-design. 😢


@UH85MNSKE in case you ever want to come back to ant, here's my override file, which I provide to shadow-cljs like this:

   {:resolve {"@ant-design/icons" {:target :file :file "overrides/ant-design-icons.js"}}}
  ... }}


Thanks! I really like the design system, I just didn't have time to figure out how to prune it :)


Hello, everyone! I’m a Clojure developer diving for the first time into ClojureScript work, and was pointed at shadow-cljs in response to a question on the #clojurescript channel, and am already delighted at how it is helping me, but I am sure I will have a bunch of questions along the way. The first one is, I can’t seem to get a cljs REPL working in CIDER. And I fear the answer may simply be “that’s because your project doesn’t support that kind of operation.” But I want to be sure.


I’m building a Node library, whose purpose is a function that takes as input an EDN string and returns an SVG string. So, there is no server that is running, it’s just a script. Which might be why CIDER complains that there is no cljs REPL even after I seem to have jacked in?


Hmm. I just tried killing everything and jacking back in, and get:

;;  Startup: /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.2 -d refactor-nrepl:2.5.0-SNAPSHOT -d cider/cider-nrepl:0.23.0-SNAPSHOT server
;; ClojureScript REPL type: node
;; ClojureScript REPL init form: (do (require 'cljs.repl.node) (cider.piggieback/cljs-repl (cljs.repl.node/repl-env)))
Execution error (AssertionError) at shadow.cljs.devtools.server.nrepl/shadow-cljs-repl (nrepl.clj:29).
Assert failed: (keyword? repl-env)
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.5.0-SNAPSHOT (package: 20190618.716) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.shadow.user>


So, it seems kind of connected, but when I do things in my .cljs buffer that needs a REPL, CIDER still complains about there being no CLJS REPL available.


But there is no urgency: I have been able to complete my port to ClojureScript successfully! This is huge, I am finally going to be able to retire LaTeX, and will be able to create the kinds of beautiful packet diagrams that its bytefield package offered by instead using a Clojure-based DSL inside Asciidoc documents. Woo hoo!


Here’s the embryonic project, in case anyone’s curious:


@deep-symmetry that doesn't look like you are using the correct setup on the cider side. this is not the command it should be using the shadow-cljs.

ClojureScript REPL init form: (do (require 'cljs.repl.node) (cider.piggieback/cljs-repl (cljs.repl.node/repl-env)))


I don't use cider and don't know how to configure it but that is the wrong command


It turns out if I start npx shadow-cljs node-repl in the terminal before I try to connect CIDER, it works! This will make me much happier as I continue to evolve this project. And the ease with which shadow-cljs allowed me to build a Node module is just delightful.


Ok, thanks. I guess CIDER has fallen behind in their auto-configuration for shadow-cljs. (I didn’t change anything in the configuration.) Working without a REPL was painful, but thankfully it was only a small, focused task! Next time I do more ClojureScript work I will see if they have fixed it, or dig deeper.


Hey, in shadow-cljs.edn I've got :main target of type :browser which produces UI. I also have .clj foo.core/init function for backend and API. What's the proper way of starting backend together with frontend? shadow-cljs watch main obviously only keeps .js file up to date.


shadow-cljs only handles CLJS related things. CLJ server you need to run separately


But shadow-cljs also provides clj-repl... Was I wrong expecting shadow-cljs to cover both backend and frontend tasks?


(ie for full-stack apps?)


it is literally in the name shadow-cljs


it is written in CLJ so you can run CLJ code ... but there is no specific support for anything "backend"


So for full stack it's expected to work with lein or boot?


or plain deps.edn yes


you are not gonna be using shadow-cljs in production so why tie your development server to it


Yeah, that's right.


But it seems super useful for development to just fire shadow-cljs clj+cljs repl instead of clj and shadow separately.