Clojure "Syntax error compiling at" in CI
The Clojure compiler hit invalid syntax while reading or compiling a form. Unbalanced parens, a malformed special form, or a wrong-arity call stops compilation.
What this error means
Compilation fails with Syntax error compiling at (app.clj:12:3), followed by the specific problem. It is deterministic and points at a location.
lein
Syntax error compiling at (app.clj:12:3).
Call to clojure.core/let did not conform to spec.
Extra input
in: [2]Common causes
Unbalanced or malformed form
A missing or extra paren/bracket, or an odd number of bindings in let, makes the form invalid.
Wrong arity or bad special-form usage
A macro or special form is called with the wrong shape (an extra binding, a missing body), failing its spec.
How to fix it
Balance and correct the form
Fix the bindings and delimiters so the form is well-formed.
app.clj
(let [x 1
y 2]
(+ x y))Read the location and spec message
- Open the reported file:line:col.
- Use a paren-matching editor or clj-kondo to find the imbalance.
- Match the special form to its expected shape.
How to prevent it
- Use a structural/paren-matching editor.
- Run clj-kondo to lint forms before compiling.
- Compile locally before pushing.
Related guides
Clojure "Unable to resolve symbol" in CIFix the Clojure "Unable to resolve symbol: X in this context" compile error in CI when a symbol is not define…
Clojure "ClassNotFoundException" in CIFix the Clojure "java.lang.ClassNotFoundException" error in CI when a Java class is imported or referenced bu…
Leiningen "Syntax error macroexpanding" in CIFix the Clojure "Syntax error macroexpanding X at" error in Leiningen CI when a macro is given a form it cann…