looks like u need cljs on classpath ...
actually, the new socket REPLs won't require any additional step
yes but you need that anyways
i added org.clojure/clojurescript in deps.edn and I can see it downloaded with clj -Spath
, the above command throws filenotfound .... could not localte cljs/main__init.classs ...
sorry, I know this isn't directly inf-clojure's question but my hope is to switch to it with the default clojure tools and lumo ...
@pri are you on 1.10.217
?
aha ... 1.9.946 .. let me update
I like deps.edn, one of the reasons I'm looking fwd to switching to it from lein
agree
four years ago I used to have a bash file that generated classpath and ran clojure projects instantly with an embedded nrepl \:)
true that 😄
added the new cljs version, and ran clojure -m cljs.main
and it opens a browser window at 9000; no repl, and I can't connect to it via inf-clojure-connect.
the command above is longer 😄
ah wait
yes for that you need the socket repl
so start cljs.main and socket repl?
just a sec
clojure -J-Dclojure.server.repl="{:port 5044 :accept cljs.server.node/repl :args [{:opts $(cat cljsc_opts.edn)}]}" -m cljs.main -re node
the args
are necessary for the passing the npm-deps
stuff to the socket REPL thread
the above drops you directly in a cljs REPL
wow, could you also paste a sample cljs_opts.edn?
{:main cli-repro.core
:verbose true
:optimizations :none
:target :nodejs
:install-deps true
:npm-deps {:left-pad "1.1.3"}}
Now I get a different error msg: "Unable to resolve symbol: PrintWriterr-on in this context .... cljs/core/server.clj ...
ah yes you need clojure latest @pri
1.10-beta?
I'm using 1.9.0
Ok, I give up on clojure/cljs/socket-repl setup; On a sad note, I just ran the same lumo socket repl commands and clojure socket repl commands and it seems like cider can't connect to socket repls due to nrepl limitations ... sigh.
yeah cider does not connect
and yes you need 1.10.0-alpha4
or something
Thanks for all your help @richiardiandrea
> Ok, I give up on clojure/cljs/socket-repl setup; On a sad note, I just ran the same lumo socket repl commands and clojure socket repl commands and it seems like cider can’t connect to socket repls due to nrepl limitations ... sigh.
@pri It’s not nREPL limitations - it’s just a completely different protocol. 🙂
It’s on CIDER’s roadmap to eventually support the socket repl protocol as well, but I can’t promise when this is going to happen.