shadow-cljs

wevrem 2025-07-29T18:50:31.730469Z

I've been running npm/npx (and thus shadow-cljs) in a docker container, to avoid installing it permanently on my system, via an alias like this in .zshrc:

npx () { docker run -it --rm -v $(pwd):/app -w /app node:24 npx "$@" }
This worked fine until...a few days ago? Can't say exactly when, but something has changed and now when I try and run shadow-cljs, I'm getting an error
shadow-cljs - config: /app/shadow-cljs.edn
shadow-cljs - socket connect failed, server process dead?
shadow-cljs - starting via "clojure"
Executable 'clojure' not found on system path.
Anyone have a suggestion? Maybe I just need to quit being so stubborn and embrace/install npm.

thheller 2025-07-29T19:13:12.836829Z

FWIW if you don't want to use npm you do not have to. works just fine without it (assuming you don't use any npm packages). see https://code.thheller.com/blog/shadow-cljs/2024/10/18/fullstack-cljs-workflow-with-shadow-cljs.html

thheller 2025-07-29T19:14:14.354079Z

the error suggests you have shadow-cljs.edn configured to use deps.edn. thus it tries to launch the jvm using the tools.deps clojure command. which it can't find in the node docker image. you can use one of the clojure images that has npm instead

thheller 2025-07-29T19:16:10.344219Z

or as I said if you have the clojure tools installed locally just run it without docker at all

thheller 2025-07-29T19:19:23.014319Z

cimg/clojure:1.12.0-openjdk-21.0-node docker img should work

wevrem 2025-07-29T21:21:26.772019Z

Thanks @thheller