This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-22
Channels
- # announcements (5)
- # aws (38)
- # aws-lambda (21)
- # babashka (45)
- # beginners (87)
- # boot (1)
- # calva (32)
- # cider (23)
- # clara (7)
- # clj-kondo (41)
- # cljs-dev (29)
- # clojure (145)
- # clojure-europe (6)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-spec (39)
- # clojure-uk (45)
- # clojurescript (171)
- # copenhagen-clojurians (4)
- # cursive (14)
- # datomic (48)
- # docker (6)
- # figwheel-main (2)
- # fulcro (54)
- # jackdaw (1)
- # jobs (1)
- # kaocha (3)
- # leiningen (7)
- # luminus (6)
- # malli (2)
- # off-topic (51)
- # pathom (8)
- # quil (20)
- # re-frame (14)
- # reagent (1)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (39)
- # tools-deps (1)
- # vim (12)
- # xtdb (5)
Hi everyone,
I'm trying to set up shadow-cljs with CIDER. I've cloned the official demo repo from https://github.com/minimal-xyz/minimal-shadow-cljs-browser. I can successfully run the following from the command line:
shadow-cljs compile app
shadow-cljs cljs-repl app
shadow-cljs watch app
According to the Docs (https://docs.cider.mx/cider/cljs/shadow-cljs.html, (https://shadow-cljs.github.io/docs/UsersGuide.html#cider) CIDER should work with shadow-cljs out of the box. However, when I run cider-jack-in-cljs
I first get asked
Are you sure you want to run 'cider-jack-in' without a Clojure project?
Then, after specifying shadow
as REPL type and :app
as the build I get the following:
error in process filter: user-error: ClojureScript is not available.
then I drop into a pure Clojure-REPL with no CLJS.
Info on this Error is scarce (see here e.g. https://clojurians-log.clojureverse.org/cider/2018-05-26), it's likely a Classpath error of some kind. (I'm running Java 1.8.0_232, Clojure 1.10.1. Emacs 26.3 and CIDER 20200120.711.)
I'm probably missing something obious here, just taking my first step with shadow-cljs (@dpsutton, you may have guessed that I'm following your suggestion to resconstruct the macchiato template in shadow-cljs)
Many thanks for any ideas you may share on this problem!
@services what’s your CIDER version. From memory, it’s been a while since support for shadow was added
@services thats weird it works fine for me. i have this version
You could just build a new project from scratch with this template?
lein new shadow-cljs <your-project-name> +reagent
or npx create-cljs-project [project-name]
another good ressource for cider: https://shadow-cljs.github.io/docs/UsersGuide.html#cider
Ok, I've tried with the template suggested by @papachan … same result. Also I've replaced my previous version of CIDER (most recent from MELPA, 20200120.711
) with the current version from MELPA-stable, which is 0.23.0
… no change
Are you running cider-jack-in-cljs
in an emacs buffer of a file that is inside the repository? You can't run the command from a scratch buffer etc...
That I know, I've tried running it from the shadow-cljs.edn
buffer and from one of the .cljs
-files under src
I am troubled however by the question Are you sure you want to run 'cider-jack-in' without a Clojure project?
You can also do a debug-on-entry
on cider--update-jack-in-cmd
and then run cider-jack-in-cljs
and step through and see if you notice anything funny. Like, you should probably have a (:project-dir "~/.../minimal-shadow-cljs-browser/")
entry in the param plist. If not, trace it back to figure out why.
i think clojure-mode is responsible for the project root. So if it doesn't speak shadow then a newer version will
@dpsutton, You got it! Turned out my clojure-mode was 20171008.743… back from when I tookmy first stab at Clojure…
…it works now … I'm wondering what other pains finding this earlier would have saved me from
Ona side note: I'm a bit surprised that CIDER didn't complain about this upon install… clojure-mode is a dependency after all…
i think emacs works like that. it only ensures a dependency is satisfied, not its version unfortunately
So am I, thanks again for your help… when it works CIDER gives me the best tooling eperience I've ever had!

@dpsutton, just for closure (no pun intended): I have now successfully ported the Macchiato template to shadow-cljs. Except for some streamlining left to be done CIDER integration works like a breeze… At some point it might make sense to share this as an alternative on clj-templates… for now: Many thanks for your help in the process!