Closed jeffp42ker closed 2 years ago
EDIT: just noticed you're already on v0.9.161 on both environments.
~I was going to say "wow, I haven't seen this one yet"--but then I just remembered that when I was first getting bb tasks set up I had to upgrade babashka to get the nrepl server to work. I guess it wasn't bundled in earlier versions. Maybe you have a newer version of bb locally and that's why it only breaks on the server? I have v0.9.161 locally and v0.8.157 on my server.~
~If that fixes it, I'll add this to my list of things to mention when I update the platypub docs. I'm hoping to spend next weekend on those. (I think bb.edn also supports specifying a minimum bb version which might be handy.)~
The nrepl code is used in the .../common/tasks.clj
file. I must've forgotten to remove the require when I moved it from common.clj
to tasks.clj
. I'm guessing that's why you still get the error even when removing it from common.clj. (However--if you're updating the default theme code, you'll need to make sure your custom theme's deps.edn file depends on the default theme with a local dependency instead of a git dependency, otherwise the change won't apply).
In any case... not sure what's causing the error. Can you run bb -e "(require '[babashka.nrepl.server])"
successfully?
If all else fails (or if you want to work on your theme and not on weird platypub/babashka errors), you could copy all the code from tasks.clj
into your own custom tasks.clj
file, get rid of the nrepl stuff, and then update your bb.edn so it uses your custom tasks.clj file instead of the default theme's. And change the default theme dependency sha to e4af4618d7eaaa969d28bda3a60237672adbb72b
, which no longer includes the nrepl require in common.clj. Obviously hopefully we can fix the root problem though.
Another workaround would be to just add a src/babashka/nrepl/server.clj file and define a start-server!
function that does a no-op.
In any case... not sure what's causing the error. Can you run bb -e "(require '[babashka.nrepl.server])" successfully?
Yes. And I too was on Babashka v0.8.157 or similar on the server before upgrading it yesterday.
And change the default theme dependency sha to e4af4618d7eaaa969d28bda3a60237672adbb72b, which no longer includes the nrepl require in common.clj. Obviously hopefully we can fix the root problem though.
Changing the default theme dependency sha fixed it; no other changes needed.
I'm happy to close the issue now and re-open if you want to find the root problem.
Huh. I'm surprised that would fix it but the bb --force
thing wouldn't.
I have a bad feeling I'm gonna have to learn more about Babashka internals sooner or later ha-ha-ha.
I might mention some of these things over in #babashka at some point.
My site theme reuses much of the default theme and works fine in dev.
However doing a "Force refresh" in production, the
babashka.nrepl.server
namespace required (and not used) in the default themecommon.clj
is not found, throwing an Exception:"Preview" 404's
I'm using the latest bb version in both environments:
I tried removing the unused
[babashka.nrepl.server :as nrepl]
require yet it still shows up for some reason.Also ran the suggestion in #72 to no avail.