Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lein test failing with No such var: leiningen.util.injected/add-hook

When I ran lein test I get this error in a new project, without touching tests or test related configuration:

Exception in thread "main" java.lang.RuntimeException: No such var: leiningen.util.injected/add-hook, compiling:(NO_SOURCE_PATH:1)
    at clojure.lang.Compiler.analyze(Compiler.java:6235)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3452)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6411)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5572)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2597)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6397)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5572)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5572)
    at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2091)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5572)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5008)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3629)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6407)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.eval(Compiler.java:6462)
    at clojure.lang.Compiler.eval(Compiler.java:6455)
    at clojure.lang.Compiler.eval(Compiler.java:6431)
    at clojure.core$eval.invoke(core.clj:2795)
    at clojure.main$eval_opt.invoke(main.clj:296)
    at clojure.main$initialize.invoke(main.clj:315)
    at clojure.main$null_opt.invoke(main.clj:348)
    at clojure.main$main.doInvoke(main.clj:426)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:405)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:518)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: No such var: leiningen.util.injected/add-hook
    at clojure.lang.Util.runtimeException(Util.java:156)
    at clojure.lang.Compiler.resolveIn(Compiler.java:6694)
    at clojure.lang.Compiler.resolve(Compiler.java:6664)
    at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6625)
    at clojure.lang.Compiler.analyze(Compiler.java:6198)
    ... 42 more
like image 715
Federico Tomassetti Avatar asked Mar 18 '23 23:03

Federico Tomassetti


1 Answers

This issue disappeares if you upgrade Clojure (1.6) and Leiningen (2)

like image 151
Federico Tomassetti Avatar answered Apr 28 '23 06:04

Federico Tomassetti