tools.deps "Error reading edn" in deps.edn in CI
The Clojure CLI parses deps.edn as EDN before doing anything else. A syntax error there (an unbalanced brace, an unquoted value, or a duplicate key) fails parsing and no classpath is built.
What this error means
clj or clojure aborts at startup with "Error reading edn" or "EOF while reading" and a location inside deps.edn.
Error reading edn from deps.edn: EOF while reading, starting at line 3
Execution error at clojure.tools.deps ... Error reading edn.Common causes
Malformed EDN in deps.edn
An unbalanced {} or [], a trailing key with no value, or a missing string quote makes the EDN reader fail.
A duplicate or invalid key in the deps map
Two identical keys in the same map, or a value that is not valid EDN, is rejected by the reader.
How to fix it
Repair the EDN structure
- Read the location the parser reports (line and "starting at").
- Balance the braces/brackets and fix the offending key or value.
- Validate by running
clojure -Spath, which parses deps.edn without running code.
{:deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:aliases {:test {:extra-paths ["test"]}}}Validate deps.edn in CI
Fail fast on a malformed file by parsing the classpath before tests.
clojure -Spath > /dev/nullHow to prevent it
- Edit deps.edn with paren/brace matching enabled.
- Run
clojure -Spathlocally before pushing deps.edn changes. - Avoid duplicate keys within the same EDN map.