hey @thheller I'm having some trouble with using the repl
apiyo@apiyo-ThinkPad:~/git-repos/<my-repo>$ yarn start-repl
yarn run v1.22.10
$ shadow-cljs cljs-repl app
shadow-cljs - config: /home/apiyo/git-repos/<my-repo>/shadow-cljs.edn
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See <http://logging.apache.org/log4j/1.2/faq.html#noconfig> for more info.
shadow-cljs - server version: 2.10.22 running at <http://localhost:9630>
shadow-cljs - nREPL server started on port 3333
WARNING: replace already refers to: #'clojure.core/replace in namespace: ona.utils.helpers, being replaced by: #'clojure.string/replace
WARNING: any? already refers to: #'clojure.core/any? in namespace: chimera.core, being replaced by: #'chimera.core/any?
cljs.user=> (js/console.log "test")
No available JS runtime.
See <https://shadow-cljs.github.io/docs/UsersGuide.html#repl-troubleshootingcljs.user=>>
my app build looks as follows:
{:app {:asset-path "/js/quagga"
:modules {:shared
{:entries []}
:organization
{:entries [quagga.components.organization.init]
:depends-on #{:shared}}
:home
{:entries [quagga.components.home.init]
:depends-on #{:shared}}
...}
:output-dir "resources/public/js/quagga/"
:target :browser
:devtools {:devtools-url "<http://localhost:3000/shadow-cljs>"}}
since I'm using a custom HTTP server, I added the :devtools
option
I'm not sure if I followed the user guide instructions correctly
I've also tried {:devtools-url "<http://localhost:9630>"}
Do I have to build a handler on my server for /shadow-cljs
path that proxies requests to http://localhost:9630?
is your server running on the same machine as shadow-cljs?
then you likely don't need to set :devtools-url
at all
otherwise you need <http://localhost:9630>
assuming shadow-cljs is reachable on that location. you can test by just opening it in the browser, you should get the UI
yes, on the same machine
then you just need to open the generated JS in the browser, no :devtools-url
check the browser console if it connects properly
in the available runtimes tab
should I find a cljs runtime
once it is connected yes. check your browser console where you are loading your app.
still getting the same error
apiyo@apiyo-ThinkPad:~/git-repos/zebra/quagga$ yarn shadow-cljs cljs-repl app
yarn run v1.22.10
$ /home/apiyo/git-repos/zebra/quagga/node_modules/.bin/shadow-cljs cljs-repl app
shadow-cljs - config: /home/apiyo/git-repos/zebra/quagga/shadow-cljs.edn
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See <http://logging.apache.org/log4j/1.2/faq.html#noconfig> for more info.
shadow-cljs - server version: 2.10.22 running at <http://localhost:9630>
shadow-cljs - nREPL server started on port 3333
WARNING: replace already refers to: #'clojure.core/replace in namespace: ona.utils.helpers, being replaced by: #'clojure.string/replace
WARNING: any? already refers to: #'clojure.core/any? in namespace: chimera.core, being replaced by: #'chimera.core/any?
cljs.user=>
(js/console.log "test")
No available JS runtime.
See <https://shadow-cljs.github.io/docs/UsersGuide.html#repl-troubleshootingcljs.user=>>
and what about the browser console?
I don't know what you are doing but what you just pasted is just telling me that no runtime has connected back to shadow-cljs. so you either didn't open the compiled code in the browser OR it failed to connect
I tried explaining how everything works in https://shadow-cljs.github.io/docs/UsersGuide.html#repl-troubleshooting
I cannot do better here
if you just care about quickly getting a REPL that is NOT related to your "app" you can just use shadow-cljs browser-repl
instead. that'll open a browser on its own.
the browser console seems silent... nothing is logged
there MUST be something logged. either "shadow ready" message OR some kind of error or timeout
I'm assuming here of course you are running a shadow-cljs watch app
already
no, I wasn't running that...
ok... that's what I was missing
thanks