Fork me on GitHub
#cursive
<
2018-04-18
>
lloydshark12:04:27

So... I'm doing some ClojureScript on node development and struggling with getting a working repl. I had used the clojure.main option with a parameters file that contained this.

(require 'cljs.repl)
(require 'cljs.build.api)
(require 'cljs.repl.node)

(cljs.build.api/build "src"
                      {:main 'something.core
                       :output-to "out/main.js"
                       :verbose true})

(cljs.repl/repl (cljs.repl.node/repl-env)
                :watch "src"
                :output-dir "out")
This used to completely work for me, but now I get "Cannot load ClojureScript file / form into Clojure repl" when I try to load files via Cursive into my repl. I started looking at using piggieback - but following instructions from https://github.com/clojure-emacs/piggieback and then connecting to it via Cursive hasn't been a complete success yet either. TLDR: What setup are people using for nodejs repls with Cursive?

cfleming21:04:55

@lloydshark You can get that error when Cursive doesn’t detect the REPL type correctly - you can fix that using the dropdown at the top right of the REPL window. It doesn’t actually change anything about the REPL, it just tells Cursive what sort you’re connected to.

lloydshark21:04:03

@cfleming Ah excellent. That works - such a simple fix 🙂 Out of curiosity is there a better repl setup you would recommend for node with cursive? (I'm not targeting the browser).