Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by
{code:title="src/foo/core.cljs"}
(println "hello")


Sometimes this works:


$ clj -Srepro -m cljs.main src/foo/core.cljs
Compiling client js ...
Serving HTTP on localhost port 9000
Listening for browser REPL connect ...
hello


and other times it doesn't:


$ clj -Srepro -m cljs.main src/foo/core.cljs
Compiling client js ...
Serving HTTP on localhost port 9000
Listening for browser REPL connect ...


and when it fails the browser will log


[Log] Could not send {:type :print, :content "\"hello\"", :order 8} after 10 attempts. (repl, line 3272)
[Log] Could not send {:type :print, :content "\"\\n\"", :order 9} after 10 attempts. (repl, line 3272)


making it appear that the REPL terminal is shutting down before the browser can flush its prints.

This seems very much related to CLJS-2574.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2596 (reported by mfikes)
...