cider-jack-in fails with "No such var: cljs/requires-piggieback" exception

Created on 11 Jun 2017  Â·  1Comment  Â·  Source: clojure-emacs/cider

Expected behavior

cider-jack-in launches a new nrepl server

Actual behavior

Getting the following exception.

Starting nREPL server via /usr/local/bin/lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.12\"\ \:exclusions\ \[org.clojure/clojure\]\] -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.15.0-SNAPSHOT\"\] -- repl :headless :host ::...
Mark set
(No files need saving) [3 times]
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error loading refactor-nrepl.middleware: java.lang.RuntimeException: No such var: cljs/requires-piggieback, compiling:(refactor_nrepl/middleware.clj:163:2)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(/private/var/folders/wt/qqzg15s11w7_gs8jlllbz9bc0000gn/T/form-init2639848109017334396.clj:1:5917)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6875)
    at clojure.lang.Compiler.analyze(Compiler.java:6669)
    at clojure.lang.Compiler.analyze(Compiler.java:6625)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3834)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6870)
    at clojure.lang.Compiler.analyze(Compiler.java:6669)
    at clojure.lang.Compiler.analyze(Compiler.java:6625)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3834)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6870)
    at clojure.lang.Compiler.analyze(Compiler.java:6669)
    at clojure.lang.Compiler.access$300(Compiler.java:38)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6269)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
    at clojure.lang.Compiler.analyze(Compiler.java:6669)
    at clojure.lang.Compiler.analyze(Compiler.java:6625)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6001)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5380)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3972)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6866)
    at clojure.lang.Compiler.analyze(Compiler.java:6669)
    at clojure.lang.Compiler.eval(Compiler.java:6924)
    at clojure.lang.Compiler.eval(Compiler.java:6917)
    at clojure.lang.Compiler.load(Compiler.java:7379)
    at clojure.lang.Compiler.loadFile(Compiler.java:7317)
    at clojure.main$load_script.invokeStatic(main.clj:275)
    at clojure.main$init_opt.invokeStatic(main.clj:277)
    at clojure.main$init_opt.invoke(main.clj:277)
    at clojure.main$initialize.invokeStatic(main.clj:308)
    at clojure.main$null_opt.invokeStatic(main.clj:342)
    at clojure.main$null_opt.invoke(main.clj:339)
    at clojure.main$main.invokeStatic(main.clj:421)
    at clojure.main$main.doInvoke(main.clj:384)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context
    at clojure.lang.Util.runtimeException(Util.java:221)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:710)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
    ... 36 more
Subprocess failed

Please note that If I add :plugins [[cider/cider-nrepl "0.14.0"]] to the project.clj, then cider-jack-in successfully launches nrepl server, so the problem seems to me that cider is trying to use cider/cider-nrepl\ \"0.15.0-SNAPSHOT\" automatically.

Steps to reproduce the problem

Run cider-jack-in from a lein sample project which project.clj looks like the following.

(defproject my-stuff "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]]
  :main ^:skip-aot my-stuff.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

Environment & Version information

CIDER version information

The output from package-list-packages.

cider is an installed package.

     Status: Installed in `~/.emacs.d/elpa/cider-20170525.255/' (unsigned).
    Archive: n/a
    Version: 20170525.255
   Requires: emacs-24.4, clojure-mode-5.6.0, pkg-info-0.4, queue-0.1.1, spinner-1.7, seq-2.16
    Summary: Clojure Interactive Development Environment that Rocks
   Homepage: http://www.github.com/clojure-emacs/cider
   Keywords: languages clojure cider 
    Other versions: 20170525.255 (melpa).

Lein/Boot version

$ lein --version
Leiningen 2.7.1 on Java 1.8.0_51 Java HotSpot(TM) 64-Bit Server VM

Emacs version

Emacs (24.5)
Spacemacs (0.200.9.x)

Operating system

OSX 10.11.6

Most helpful comment

I found that the issue was with my ~/.lein/profiles.clj which has very old version of cider/cider-nrepl. Removing the file fixed the issue.

>All comments

I found that the issue was with my ~/.lein/profiles.clj which has very old version of cider/cider-nrepl. Removing the file fixed the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MicahElliott picture MicahElliott  Â·  7Comments

manuel-uberti picture manuel-uberti  Â·  4Comments

vijaykiran picture vijaykiran  Â·  9Comments

phillord picture phillord  Â·  3Comments

xificurC picture xificurC  Â·  5Comments