This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-24
Channels
- # aleph (5)
- # announcements (18)
- # babashka (3)
- # babashka-sci-dev (56)
- # beginners (56)
- # biff (5)
- # calva (27)
- # cider (20)
- # clj-commons (2)
- # clj-kondo (17)
- # cljsrn (18)
- # clojure (41)
- # clojure-europe (24)
- # clojure-nl (1)
- # clojure-serbia (1)
- # clojure-uk (15)
- # clojured (1)
- # clojurescript (40)
- # cursive (39)
- # datahike (2)
- # datalevin (4)
- # datascript (5)
- # emacs (23)
- # events (2)
- # figwheel-main (3)
- # inf-clojure (1)
- # instaparse (23)
- # introduce-yourself (3)
- # jobs (3)
- # jobs-discuss (13)
- # joyride (1)
- # juxt (10)
- # malli (21)
- # nbb (29)
- # off-topic (18)
- # pathom (29)
- # polylith (11)
- # project-updates (1)
- # proletarian (1)
- # rdf (2)
- # re-frame (4)
- # reitit (2)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (52)
- # tools-deps (57)
- # xtdb (32)
i got that "Stale Output! Your loaded JS was not produced by the running shadow-cljs instance. Is the watch for this build running?" message that seems to be quite common among beginners...
things were working properly for me, and then suddenly i started getting this error message
i didn't know what i changed to cause it, i tried reloading the page, restarting browser, restarting repl, restarting shadow-cljs, restarting my machine
the behavior seems possibly consistent with the page being cached in the browser (and private tabs ignoring the cache?), but i'm still not sure why things were working for several days before i hit this issue
the built-in sets the proper cache headers so this doesn't happen. otherwise it might be cache related
the problem could also be caused by having shadow-cljs running twice in the same project
now that i think about it, does my caching explanation even make sense? why would deleting app.js even cause a 404 in the console if it was cached?
i did check for multiple shadow-cljs since you mentioned that to other people...restarting my machine and starting everything fresh should rule that possibility out
if you don't set your caching headers I don't think any are set by default. which will not be ideal with regards to caching
i'm new to all this so i don't know how to check the caching headers in the response, but i'm very curious myself
presumably there's some debug option i can set to get kit/undertow to print the response somewhere? (i will look into this more myself when i get a chance)
no need to check kit/undertow. the browser network thing will tell you everything you need to know
dunno why there is two but one is done so maybe it got reconnected? maybe computer sleep?
ok, i only mentioned it in case it might be related to the issue was having, sounds like it's fine
I'm getting "No available JS runtime." while developing a file using an :npm-module based build target. The npm module is running in the browser - what is the best way to connect the repl when using :npm-module?
I think I figured it out, was missing the following:
window["$CLJS"] = require("./npm-module/cljs_env");
require("./npm-module/shadow.cljs.devtools.client.browser");
window["$CLJS"] = require("./npm-module/cljs_env");
this you shouldn't do. it won't work in a release
build in case you use it for anything
Hello. I just bumped shadow version from 2.16.6 to 2.19.0 (latest) and get the following error :
Caused by: java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableMap com.google.common.collect.ImmutableMap$Builder.buildOrThrow()'
I looked for it on Google but didn't get anything interesting. Does someone has a clue ? Thanks a lot.
this is caused by a dependency conflict on the guava dependency. the closure-compiler doesn't properly declare it so it gets messed up
Oh thanks.
I forced guava to the latest version (`31.1-jre`) and it worked.
> the closure-compiler doesn't properly declare it so it gets messed up
Indeed, I couldn't find guava as a dependency of shadow using clj -X:deps tree | less
yeah, fix is in process https://github.com/google/closure-compiler/pull/3935
All, fix is to explicitly add
com.google.guava/guava {:mvn/version "31.1-jre"}