I have a project that builds fine in docker, and even seems to run fine when the docker image is built and run remotely, but locally when i do a cider-eval-buffer on the clj file containing the entrypoint, I'm getting
Unexpected error (NoSuchFieldError) macroexpanding clojure.core.async/go at (src/logaze/core.clj:34:5).
Class clojure.tools.analyzer.jvm.utils__init does not have member field 'clojure.lang.ILookupThunk __thunk__0__'
I get the same error when I run lein ring server on a terminal.
What part of my local setup should I look at?maybe different Clojure version?
How do I check that?
$ lein --version
Leiningen 2.12.0 on Java 25.0.1 OpenJDK 64-Bit Server VM
That's not the clojure version, right?$ clj --version
Clojure CLI version 1.12.4.1582by default cider prints the clojure version and a lot of other helpful diagnostics when you connect the repl
;; CIDER 1.21.0-snapshot (package: 20251224.2122), nREPL 1.5.1
;; Clojure 1.12.3, Java 25.0.1
What should this be the same as?is that the same as what's in the docker?
hmm in docker I just have clojure:lein
maybe some kind of docker run -ti ... lein repl?
to see what's in that container
hmm. In the container I just have lein, there's no clj available.
I believe that's correct? The clojure version should be specified in project.clj?
How are you running the app on the server? How are running it locally?
locally I'm doing lein ring server
in the dockerfile, I'm building with lein ring uberjar
and then running the jar
does lein ring uberjar work locally?
yes, lein ring uberjar works locally
hmm okay now looking again, I see
:profiles {:dev [:profiles/dev]
:uberjar {:aot :all}})
in my project.cljso maybe it isn't compiling without aot?
AOT is usually fine for an uberjar.
One thing that can happen with core async is if you compile with one version of core async and then run it later with another version of core async, you can have problems like the one you see.
How do I remove all the local compiled versions?
It's possible that you previously compiled your project earlier with a different version and then never recompiled in your dev environment.
lein clean might help
thanks! I think it worked
thank you so much!