Fork me on GitHub

hi guys, I'm trying to start a little project with shadow-clj / re-frame / emacs / cider with the re-frame template, with lein. Opening the repl from within Emacs (C-c M-j) works ok, but when invoking any function, in different namespaces, I keep getting the same error reported:

Syntax error compiling at (*cider-repl flexiana/scrambler-fe:localhost:8777(clj)*:50:20).
Unable to resolve symbol: init in this context
and no Clojure / REPL related Emacs shortcut works, i.e. C-c C-k to compile and load current buffer, or C-c C-z to jump straight into REPL.


I tried the same with the front-end / SPA module of the following little Clojure fullstack project I've taking as reference:, SPA:, but in that other context, I keep getting exactly the same issues described above.


Futhermore, as I start up the SPA from CLI as explained in its README:

$ npm install
$ npx shadow-cljs watch app
the SPA works well, but when started up by starting up the REPL from Emacs (C-c M-j), the SPA runs, but reporting the following warning:
shadow-cljs - Stale Output! Your loaded JS was not produced by the running shadow-clj instance. Is the watch for this build running?


does anybody guess what might be the reason of these issues, or what I'm doing wrong? thanks !

Volodymyr Anokhin08:05:12

If my local lein is at /usr/bin/lein and remote server has it at /opt/asdf/shims/lein and I try to jack-in into remote project (opened via tramp) I get an error

You can run the command 'cider-jack-in-clj' with SPC m '
error in process sentinel: Could not start nREPL server: /bin/sh: 1: lein: not found
I guess I can omit this if I set up asdf version of lein on my local machine, but perhaps the channel has better ideas?


the error says lein not found I'd check which lein. I would maybe ln -s /opt/asdf/shims/lein /usr/bin

Volodymyr Anokhin16:05:47

this worked a step further but now java is not found o_O

error in process sentinel: Could not start nREPL server: /opt/asdf/installs/leiningen/2.9.8/bin/lein: line 257: type: java: not found
Leiningen couldn't find 'java' executable, which is required.
Please either set JAVA_CMD or put java (>=1.6) in your $PATH (/opt/asdf/installs/leiningen/2.9.8/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin).
Will try similar approach with java

Volodymyr Anokhin16:05:46

Setting $JAVA_CMD to asdf path worked -- so if someone (or future me) has problems with cider session remote jack-in using asdf-based setup, try to experiment a bit with lein and java binaries availability.


I want to connect to two different CIDER nREPLs within the same project. Is that supported?


Usually I want to connect to the other nREPL only for one or two specific files

Hans Conrad15:05:59

I know in spacemacs clojure layer it is supported ..but not sure if it's a cider thing or something else. Oddly enough I have a similar use case like you (running babashka repl..along side my project repl)


@hans.conrad Yes, this is similar, but now it's a JVM REPL + a custom CLJS REPL

Hans Conrad15:05:23

neat... btw sorry looks like it is using this for multiple connections


hmm, yes, I was trying that as well...

Hans Conrad15:05:28

with sesman I can link a connection to a specific buffer


 (assoc "babashka"
	(sesman-sessions 'CIDER)))
if you have a session called "babashka"


FYI - CIDER 1.4 ("Kyiv") is out! See for details.

cider 8

I've just updated and trying cider-undef-all It gives me this error:

#namespace[]Syntax error compiling at (src/clojure_experiments/security/encryption.clj:48:4).
No such namespace: System
Here's the code: If I remove the ns and eval the buffer as usual (with the prefix) then it works again. I'm using spacemacs if that matters.


Probably you've encountered some edge-case we didn't notice. Please, file an issue about this.


@U191H9E5C @U051BLM8F that issue is I think what is happening to me.