Help using cider-jack-in-clojurescript

Posted this on r/clojurescript but it doesn’t appear to be getting much visibility.

I want to create a cljs project targetting node.js and I would like to use cider similar to how I normally work with Clojure projects (ie cider-jack-in and occasionally cider-eval-*). How do?

Steps taken so far:

  1. lein new figwheel-node hello-world (should I use a different template?)
  2. cd hello-world
  3. npm install
  4. cider-jack-in-clojurescript after opening the project in Emacs

npm gave a lot of errors during step 3. clojure gave more errors during step 4.

I’m on Windows.

Hello Daniel!

First, I feel your pain. I’ve tried to get started with ClojureScript a few times, and setting up that REPL is very often the crux of the problem.

I just tried the figwheel-node template, and can confirm that I’m not able to jack-in with CIDER after initialization (Ubuntu Linux 18.04). It struck me that the generated package was quite old (it used Clojure 1.8.0, current is 1.10.1).

Personally, I’ve had a good experiences with Shadow-CLJS! You might find the documentation for how Shadow-CLJS handles Node targets useful.

Good luck!

Teodor

Made some progress with both of these approaches.

  1. Updating all the deps for figwheel-node fixes the node errors and allows me to start a regular clojure repl but emacs hangs when I try to jack into a cljs repl.
  2. Cider apparently works with npx-generated projects using shadow-cljs. I managed to get a node repl going on the cmd line and Cider started a regular Clojure repl without hanging Emacs. There appears to be some kind of interactive dashboard with a builtin repl which I could not get to work.

I’ll need to play with shadow-cljs more in order to do anything useful.