Fork me on GitHub
#clojurescript
<
2022-08-06
>
NickName11:08:02

I’m trying to start shadow repl with emacs cider. I’m using luminus template with re-frame. I have npx shadow-cljs watch app running separately. I’m trying: cider-jack-in-cljs -> lein -> shadow -> :app. Then I get this error:

Execution error (ExceptionInfo) at shadow.cljs.devtools.server.runtime/get-instance! (runtime.clj:11).
shadow-cljs has not been started yet!
In embedded mode you need to call (shadow.cljs.devtools.server/start!) to start it.
If you have a shadow-cljs server or watch running then you are not connected to that process.
Am I doing something wrong? Can you please point me in the right direction? I’m not that familiar with the tooling and clojure(script) in general so don’t know where to start digging.

jkxyz11:08:59

If you already have shadow-cljs running you can connect to the REPL using cider-connect-cljs - jack-in is for starting a new REPL. But also if you're using jack-in to launch shadow the REPL type should be “shadow” and not “lein” I think (unless you're using shadow embedded in another process that you launch with lein).

NickName13:08:02

Right, I don’t want to cider-jack-in, I want to cider-connect to the existing shadow process. Additionally, I was trying to connect to repl while serving the app from ring server which was not configured for this task. So I just decided to serve with shadow itself (by specifing :dev-http in shadow-cljs.edn, in case anyone wonders). This way it works. Thanks a lot @UE72GJS7J!

jkxyz14:08:27

Sounds like a good approach!

🙏 1