Skip to content

Error 'Can't start nREPL' #48

Closed
@mhansen

Description

@mhansen

I think the issue is that you're invoking lein with LEIN_ARGS, defining a bunch of libraries wanted, but I don't have those libraries installed.

Then lein prints this to stderr:
"""
Retrieving refactor-nrepl/refactor-nrepl/2.3.0-SNAPSHOT/refactor-nrepl-2.3.0-20170531.195417-17.jar from clojars
Retrieving org/clojure/clojure/1.2.0/clojure-1.2.0.jar from central
Retrieving cider/cider-nrepl/0.15.0-SNAPSHOT/cider-nrepl-0.15.0-20170720.063753-24.pom from clojars
Retrieving org/clojure/tools.nrepl/0.2.13/tools.nrepl-0.2.13.pom from central
Retrieving org/clojure/pom.contrib/0.2.2/pom.contrib-0.2.2.pom from central
Retrieving org/tcrawley/dynapath/0.2.5/dynapath-0.2.5.pom from central
"""

And we treat any data coming in off stderr as a signal to stop() and reject the start promise:
https://github.com/avli/clojureVSCode/blob/master/src/nreplController.ts#L49
Then it kills the process.

I imagine this didn't happen during development because you already have these libraries installed on your machine?

Debugging screenshot illustrating the point (see the console at the bottom, printing out the stderr data we received):
screen shot 2017-07-23 at 12 20 55

What can we do? Maybe
(a) document that these libraries are required?
(b) install these libraries? lein tries to, but it gets killed soon after.
(c) assume processes will send user-facing information to stderr (rather than it explicitly signalling an error), and only treat a non-zero exit code as actually signalling error?

(c) seems best to me. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions