This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-24
Channels
- # announcements (4)
- # babashka (75)
- # beginners (57)
- # calva (26)
- # cider (1)
- # clj-kondo (18)
- # cljs-dev (2)
- # clojure (31)
- # clojure-czech (1)
- # clojure-europe (23)
- # clojure-france (3)
- # clojure-germany (2)
- # clojure-uk (3)
- # clojurescript (23)
- # conjure (9)
- # data-oriented-programming (5)
- # datomic (14)
- # defnpodcast (1)
- # deps-new (12)
- # expound (4)
- # fulcro (32)
- # helix (4)
- # jackdaw (70)
- # joker (1)
- # malli (1)
- # music (2)
- # off-topic (19)
- # other-languages (6)
- # podcasts-discuss (5)
- # portal (6)
- # quil (5)
- # re-frame (16)
- # shadow-cljs (14)
- # spacemacs (7)
- # vim (5)
- # xtdb (22)
hi! I'm somehow getting a nullpointerexception when trying to set this up. I have the following in ~/.clojure/deps.edn
:
:aliases {:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["-m" "rebel-readline.main"]}
:new {:extra-deps {com.github.seancorfield/clj-new
{:mvn/version "1.1.297"}}
:exec-fn clj-new/create
:exec-args {:template "app"}}}
and running clojure -X:new :name myname/myapp
gives me this stacktrace:
{:clojure.main/message
"Execution error (NullPointerException) at clj-exec/requiring-resolve' (clj_exec.clj:57).\nnull\n",
:clojure.main/triage
{:clojure.error/class java.lang.NullPointerException,
:clojure.error/line 57,
:clojure.error/symbol clj-exec/requiring-resolve',
:clojure.error/source "clj_exec.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type java.lang.NullPointerException,
:at [clojure.core$namespace invokeStatic "core.clj" 1603]}],
:trace
[[clojure.core$namespace invokeStatic "core.clj" 1603]
[clojure.core$namespace invoke "core.clj" 1597]
[clj_exec$requiring_resolve_SINGLEQUOTE_
invokeStatic
"clj_exec.clj"
57]
[clj_exec$requiring_resolve_SINGLEQUOTE_ invoke "clj_exec.clj" 54]
[clj_exec$exec invokeStatic "clj_exec.clj" 67]
[clj_exec$exec doInvoke "clj_exec.clj" 64]
[clojure.lang.RestFn invoke "RestFn.java" 423]
[clj_exec$exec_alias invokeStatic "clj_exec.clj" 89]
[clj_exec$exec_alias invoke "clj_exec.clj" 80]
[clj_exec$_main invokeStatic "clj_exec.clj" 100]
[clj_exec$_main doInvoke "clj_exec.clj" 95]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 665]
[clojure.main$main_opt invokeStatic "main.clj" 514]
[clojure.main$main_opt invoke "main.clj" 510]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]]}}
Any idea what's happening?@arne-clojurians Are you running that command in a directory that has a deps.edn
file? Maybe that has a :new
alias that is hiding your user-level one?
Also, what does clojure -Sdescribe
say?
@U04V70XH6 thanks for your response! the error happens in different directories, none of which has a deps.edn
, so the shadowing doesn't happen.
clojure -Sdescribe
looks like this:
{:version "1.10.1.645"
:config-files ["/nix/store/1j1rbh1yy66rmpf1lqfsafni06k7bvid-clojure-1.10.1.645/deps.edn" "/home/arne/.clojure/deps.edn" ]
:config-user "/home/arne/.clojure/deps.edn"
:config-project "deps.edn"
:install-dir "/nix/store/1j1rbh1yy66rmpf1lqfsafni06k7bvid-clojure-1.10.1.645"
:config-dir "/home/arne/.clojure"
:cache-dir "/home/arne/.clojure/.cpcache"
:force false
:repro false
:resolve-aliases ""
:classpath-aliases ""
:jvm-aliases ""
:main-aliases ""
:tool-aliases ""
:all-aliases ""}
the other deps.edn
in /nix/store/…
is the vanilla deps.edn
:
{
:paths ["src"]
:deps {
org.clojure/clojure {:mvn/version "1.10.1"}
}
:aliases {
:deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.9.763"}}}
:test {:extra-paths ["test"]}
}
:mvn/repos {
"central" {:url " "}
"clojars" {:url " "}
}
}
1.10.1.645 is pretty old — a lot has changed since then — and that isn’t even a stable release: https://clojure.org/releases/tools
clj-new
’s README states 1.10.1.727 as a minimum version.
LMK if you still see the error on an up-to-date Clojure CLI.