Clojure Leiningen "Could not find artifact" in CI
Leiningen queried Clojars and Maven Central for a dependency and none returned a matching artifact. It reports "Could not find artifact <group>:<name>:jar:<version>" with the repositories it searched.
What this error means
lein deps or a build fails with "Could not find artifact X:Y:jar:Z in central (...)" and "in clojars (...)", naming the coordinate it could not download.
clojure
Could not find artifact cheshire:cheshire:jar:9.9.9 in central
(https://repo1.maven.org/maven2/)
Could not find artifact cheshire:cheshire:jar:9.9.9 in clojars
(https://repo.clojars.org/)Common causes
The coordinate or version does not exist
A typo in the group/name or a version that was never published means no repository has the JAR.
A repository hosting the artifact is not configured
The dependency lives in a repository not listed in :repositories, so lein never searches where it exists.
How to fix it
Correct the dependency coordinate
- Read the group, name, and version in the error.
- Confirm the artifact exists and fix the coordinate in
project.clj. - Re-run
lein depsso it resolves.
project.clj
:dependencies [[cheshire "5.13.0"]]Add the repository that hosts it
Declare the extra repository so lein searches where the artifact actually lives.
project.clj
:repositories [["internal" {:url "https://maven.internal.example.com/releases"}]]How to prevent it
- Pin only versions confirmed published on Clojars or Central.
- Declare extra
:repositoriesfor private artifacts. - Run
lein depslocally before pushing so missing artifacts surface.
Related guides
Clojure "Could not locate X on classpath" (deps.edn) in CIFix Clojure "Could not locate X__init.class, X.clj or X.cljc on classpath" in CI - a require targets a namesp…
Clojure "ClassNotFoundException" (deps.edn) in CIFix Clojure "java.lang.ClassNotFoundException: X" in CI - code referenced a Java class that is not on the cla…
Clojure "Syntax error compiling: Unable to resolve symbol" in CIFix Clojure "Syntax error compiling at ... Unable to resolve symbol: X in this context" in CI - the compiler…