This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-30
Channels
- # announcements (1)
- # babashka (15)
- # calva (3)
- # cider (1)
- # clj-kondo (16)
- # clj-on-windows (1)
- # cljfx (1)
- # clojure (25)
- # clojure-europe (6)
- # clojure-spec (15)
- # cursive (13)
- # emacs (11)
- # fulcro (2)
- # humbleui (7)
- # introduce-yourself (1)
- # jackdaw (1)
- # off-topic (10)
- # pathom (5)
- # portal (3)
- # re-frame (7)
- # reagent (12)
- # releases (1)
- # shadow-cljs (8)
- # tools-build (18)
- # web-security (10)
When starting cursive I get this error:
com.intellij.execution.ExecutionException: Cannot execute: Could not find :version in command output when executing /usr/local/bin/clojure
And I get zero results when searching for this error message 😬 – any suggestions?No worries 🙂 Here’s the output:
❯ clojure -Sdescribe
{ version "1.11.1.1182"
config-files ["/usr/local/Cellar/clojure/1.11.1.1182/deps.edn" "/Users/thomas/.clojure/deps.edn" ]
config-user "/Users/thomas/.clojure/deps.edn"
config-project "deps.edn"
install-dir "/usr/local/Cellar/clojure/1.11.1.1182"
config-dir "/Users/thomas/.clojure"
cache-dir "/Users/thomas/.clojure/.cpcache"
force false
repro false
main-aliases ""
repl-aliases ""}
Here’s what I see:
~/d/cursive (master)> clojure -Sdescribe
{:version "1.11.1.1182"
:config-files ["/opt/homebrew/Cellar/clojure/1.11.1.1182/deps.edn" "/Users/colin/.clojure/deps.edn" "deps.edn" ]
:config-user "/Users/colin/.clojure/deps.edn"
:config-project "deps.edn"
:install-dir "/opt/homebrew/Cellar/clojure/1.11.1.1182"
:config-dir "/Users/colin/.clojure"
:cache-dir ".cpcache"
:force false
:repro false
:main-aliases ""
:repl-aliases ""}
See how your keys are symbols rather than keywords? I think that’s the problem, but I have no idea why that would happen.
If you’re not sure why that might be happening, it would be worth asking over in #C6QH853H8
@U06DX1ANS i would probably upgrade or reinstall homebrew, because that's a bit suspicious, that your built-in deps.edn
file is under /usr/local/
and not under /usr/homebrew/
.
alternatively, i'd recommend using Nix instead of homebrew for managing non-GUI apps, because it yields in more reproducible environments.
u can even have multiple environments side-by-side, without affecting each other and it's also completely isolated from your homebrew installation or the built-in macOS programs.
just install with
sh <(curl -L ) --daemon
as described in https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation
(the install
script explains very precisely what it will do and why)
then, in a newly opened terminal window, either try clojure temporarily with:
nix-shell -p clojure
which will downloads Clojure CLI tools for the 1st time, then starts a new bash
shell, where clojure
is on your PATH
:
[nix-shell:~]$ clojure -Sdescribe
{:version "1.11.1.1177"
:config-files ["/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-1.11.1.1177/deps.edn" "/Users/onetom/.clojure/deps.edn" ]
:config-user "/Users/onetom/.clojure/deps.edn"
:config-project "deps.edn"
:install-dir "/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-1.11.1.1177"
:config-dir "/Users/onetom/.clojure"
:cache-dir "/Users/onetom/.clojure/.cpcache"
:force false
:repro false
:main-aliases ""
:repl-aliases ""}
or you can install it in a way, that's it's always available for your user:
nix-env -iA nixpkgs.clojure
then remove with
nix-env -e clojure
in case u want the homebrew version found first on your PATH
again.IIRC (it’s been a while) I think brew on Intel installs binaries, at least, to /usr/local
. I might be wrong on that, though.
FYI, the problem was that I was using the default bash on macOS. The script behaves differently on a more recent one. https://clojure.atlassian.net/browse/TDEPS-233