Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to Clojure project after upgrading to 0.5.19 #890

Closed
kenny-evitt opened this issue Nov 12, 2013 · 23 comments

Comments

Projects
None yet
@kenny-evitt
Copy link
Contributor

commented Nov 12, 2013

The popup message:

Looks like there was an issue trying to connect to the project. Here's what we got:
final project:  {:nrepl-middleware [lighttable.nrepl.handler/lighttable-ops], :init (clojure.core/swap! lighttable.nrepl.core/my-settings clojure.core/merge {:name "hello-heroku-clojure-world 1.0.0-SNAPSHOT", :project (quote {:compile-path "C:\\@code\\hello-heroku-clojure-world\\target\\classes", :group "hello-heroku-clojure-world", :license {:name "WTFPL", :url "http://www.wtfpl.net/"}, :global-vars {}, :checkout-deps-shares [:source-paths :test-paths :resource-paths :compile-path #'leiningen.core.classpath/checkout-deps-paths], :dependencies ([org.clojure/clojure "1.5.1"] [org.clojure/java.jdbc "0.2.3"] [clj-time/clj-time "0.5.0"] [com.cemerick/friend "0.2.0"] [compojure/compojure "1.1.1"] [drift/drift "1.5.2"] [hiccup/hiccup "1.0.3"] [environ/environ "0.2.1"] [postgresql/postgresql "9.1-901.jdbc4"] [ring/ring-jetty-adapter "1.1.0"] [ring/ring-devel "1.1.0"] [ring-basic-authentication/ring-basic-authentication "1.0.1"] [org.clojure/tools.nrepl "0.2.3" :exclusions ([org.clojure/clojure])] [clojure-complete/clojure-complete "0.2.3" :exclusions ([org.clojure/clojure])]), :plugin-repositories [["central" {:snapshots false, :url "http://repo1.maven.org/maven2/"}] ["clojars" {:url "https://clojars.org/repo/"}]], :test-selectors {:default (constantly true)}, :target-path "C:\\@code\\hello-heroku-clojure-world\\target", :name "hello-heroku-clojure-world", :deploy-repositories [["clojars" {:username :gpg, :url "https://clojars.org/repo/", :password :gpg}]], :root "C:\\@code\\hello-heroku-clojure-world", :offline? false, :source-paths ("C:\\@code\\hello-heroku-clojure-world\\src"), :certificates ["clojars.pem"], :hooks [environ.leiningen.hooks], :version "1.0.0-SNAPSHOT", :env {:production false}, :jar-exclusions [#"^\."], :profiles {:production {:env {:production true}}, :dev {:env {:production false}}}, :prep-tasks ["javac" "compile"], :url "http://hello-heroku-clojure-world.herokuapp.com", :repositories [["central" {:snapshots false, :url "http://repo1.maven.org/maven2/"}] ["clojars" {:url "https://clojars.org/repo/"}]], :resource-paths ("C:\\@code\\hello-heroku-clojure-world\\dev-resources" "C:\\@code\\hello-heroku-clojure-world\\resources"), :uberjar-exclusions [#"(?i)^META-INF/[^/]*\.(SF|RSA|DSA)$"], :main hello-heroku-clojure-world.web, :min-lein-version "2.0.0", :jvm-opts [], :eval-in :subprocess, :plugins ([drift/drift "1.5.2"] [environ/environ.lein "0.2.1"]), :native-path "C:\\@code\\hello-heroku-clojure-world\\target\\native", :description "Sandbox Clojure web app intended to run on Heroku", :uberjar-merge-with {"META-INF/plexus/components.xml" leiningen.uberjar/components-merger, "data_readers.clj" leiningen.uberjar/clj-map-merger}, :test-paths ("C:\\@code\\hello-heroku-clojure-world\\test"), :clean-targets [:target-path]})})}
Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: reader/*alias-map* in this context, compiling:(cljs/analyzer.clj:1219:9)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context, compiling:(C:\Documents and Settings\Kenny\Local Settings\Temp\form-init4769247176514789389.clj:1:5084)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.access$100(Compiler.java:37)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.eval(Compiler.java:6616)
    at clojure.lang.Compiler.eval(Compiler.java:6609)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.Compiler.loadFile(Compiler.java:7020)
    at clojure.main$load_script.invoke(main.clj:294)
    at clojure.main$init_opt.invoke(main.clj:299)
    at clojure.main$initialize.invoke(main.clj:327)
    at clojure.main$null_opt.invoke(main.clj:362)
    at clojure.main$main.doInvoke(main.clj:440)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context
    at clojure.lang.Util.runtimeException(Util.java:219)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:650)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    ... 33 more
clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
    at clojure.core$ex_info.invoke(core.clj:4327)
    at leiningen.core.eval$fn__2079.invoke(eval.clj:226)
    at clojure.lang.MultiFn.invoke(MultiFn.java:231)
    at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.AFn.applyTo(AFn.java:151)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.repl$repl.doInvoke(repl.clj:253)
    at clojure.lang.RestFn.invoke(RestFn.java:425)
    at leiningen.light_nrepl$light.doInvoke(light_nrepl.clj:36)
    at clojure.lang.RestFn.invoke(RestFn.java:423)
    at leiningen.light_nrepl$_main.doInvoke(light_nrepl.clj:48)
    at clojure.lang.RestFn.invoke(RestFn.java:397)
    at clojure.lang.AFn.applyToHelper(AFn.java:159)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at leiningen.light_nrepl.main(Unknown Source)
@ibdknox

This comment has been minimized.

Copy link
Member

commented Nov 12, 2013

We updated our dependencies on ClojureScript and tools.reader to the latest. The error you're getting is from a dependency mismatch in one of those two.

@ibdknox

This comment has been minimized.

Copy link
Member

commented Nov 12, 2013

I just pushed out 0.5.20, which should fix this.

@ibdknox ibdknox closed this Nov 12, 2013

@kenny-evitt

This comment has been minimized.

Copy link
Contributor Author

commented Nov 13, 2013

Fixed – thanks!

@lostpupil

This comment has been minimized.

Copy link

commented Nov 14, 2013

Still got the same error in 0.5.20.

final project: ([com.h2database/h2 "1.3.174"] [ring-server/ring-server "0.3.1"] [com.taoensso/timbre "2.7.1"] [markdown-clj/markdown-clj "0.9.35"] [korma/korma "0.3.0-RC6"] [selmer/selmer "0.5.2"] [org.clojure/clojure "1.5.1"] [log4j/log4j "1.2.17" :exclusions ([javax.mail/mail] [javax.jms/jms] [com.sun.jdmk/jmxtools] [com.sun.jmx/jmxri])] [compojure/compojure "1.1.6"] [com.taoensso/tower "1.7.1"] [lib-noir/lib-noir "0.7.5"] [com.postspectacular/rotor "0.1.0"] [org.clojure/tools.nrepl "0.2.3" :exclusions ([org.clojure/clojure])] [clojure-complete/clojure-complete "0.2.3" :exclusions ([org.clojure/clojure])] [ring-mock/ring-mock "0.1.5"] [ring/ring-devel "1.2.1"] [lein-light-nrepl/lein-light-nrepl "0.0.9"] [org.clojure/tools.reader "0.7.10"])
Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: reader/alias-map in this context, compiling:(cljs/analyzer.clj:1219:9)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context, compiling:(C:\Users\R506\AppData\Local\Temp\form-init6011970997991872955.clj:1:3798)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.eval(Compiler.java:6616)
at clojure.lang.Compiler.eval(Compiler.java:6609)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:294)
at clojure.main$init_opt.invoke(main.clj:299)
at clojure.main$initialize.invoke(main.clj:327)
at clojure.main$null_opt.invoke(main.clj:362)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context
at clojure.lang.Util.runtimeException(Util.java:219)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:650)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
... 33 more
clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
at clojure.core$ex_info.invoke(core.clj:4327)
at leiningen.core.eval$fn__2079.invoke(eval.clj:226)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.repl$repl.doInvoke(repl.clj:253)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at leiningen.light_nrepl$light.doInvoke(light_nrepl.clj:37)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at leiningen.light_nrepl$_main.doInvoke(light_nrepl.clj:49)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at leiningen.light_nrepl.main(Unknown Source)

@ibdknox

This comment has been minimized.

Copy link
Member

commented Nov 14, 2013

can you run lein deps :tree

@francoisroyer

This comment has been minimized.

Copy link

commented Nov 17, 2013

Experiencing the same issue here, Lighttable 0.5.20 and the following dev profile:

         :dev {:source-paths ["dev" "src"]
               :plugins [
                         [lein-midje     "3.0.1"]
                         [lein-cljsbuild "1.0.0-alpha2" :exclusions [[org.clojure/tools.reader]]]
                         [lein-ring "0.8.6"]
                         [com.palletops/pallet-lein "0.8.0-alpha.1"]
                         ]
               :dependencies [[org.clojure/tools.namespace "0.2.4"]
                              [lein-light-nrepl "0.0.9":exclusions [[org.clojure/clojurescript]]]; [[org.clojure/tools.reader] [ibdknox/analyzer] ]]
                              [ns-tracker "0.2.1"]
                              [midje "1.5.1"]
                              [ring-mock "0.1.5"]
                              [org.clojure/clojurescript "0.0-2030" :exclusions [[org.clojure/tools.reader]]]
                              [org.apache.hadoop/hadoop-core "1.2.1"
                               :exclusions [[org.codehaus.jackson/jackson-mapper-asl]
                                            [org.codehaus.jackson/jackson-core-asl]
                                            [org.slf4j/slf4j-api]]]
                              ]
               :repl-options {:nrepl-middleware [
                                                 lighttable.nrepl.handler/lighttable-ops
                                                 ]
                              }
               :injections []}
@francoisroyer

This comment has been minimized.

Copy link

commented Nov 17, 2013

Haha - seems that some older version of tools.reader snuck in somewhere silently. Investigating ...

@actsasgeek

This comment has been minimized.

Copy link

commented Nov 28, 2013

Same issue in 0.5.20:

Looks like there was an issue trying to connect to the project. Here's what we got:
final project: ([org.clojure/clojurescript "0.0-2080"] [org.clojure/clojure "1.5.1"] [org.clojure/tools.nrepl "0.2.3" :exclusions ([org.clojure/clojure])] [clojure-complete/clojure-complete "0.2.3" :exclusions ([org.clojure/clojure])] [lein-light-nrepl/lein-light-nrepl "0.0.9"] [org.clojure/tools.reader "0.7.10"])
Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: cljs.compiler/cljs-source-map in this context, compiling:(lighttable/nrepl/cljs.clj:106:9)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context, compiling:(/private/var/folders/v7/z794_7_s1qvgdlk1t8pvftqr0000gp/T/form-init411249982601860730.clj:1:3493)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.eval(Compiler.java:6616)
at clojure.lang.Compiler.eval(Compiler.java:6609)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:294)
at clojure.main$init_opt.invoke(main.clj:299)
at clojure.main$initialize.invoke(main.clj:327)
at clojure.main$null_opt.invoke(main.clj:362)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context
at clojure.lang.Util.runtimeException(Util.java:219)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:650)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
... 33 more
clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
at clojure.core$ex_info.invoke(core.clj:4327)
at leiningen.core.eval$fn__2079.invoke(eval.clj:226)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.repl$repl.doInvoke(repl.clj:253)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at leiningen.light_nrepl$light.doInvoke(light_nrepl.clj:37)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at leiningen.light_nrepl$_main.doInvoke(light_nrepl.clj:49)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at leiningen.light_nrepl.main(Unknown Source)

lein deps :tree shows:

[clojure-complete "0.2.3" :exclusions [[org.clojure/clojure]]]
[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-2080"]
[com.google.javascript/closure-compiler "v20130603"]
[args4j "2.0.16"]
[com.google.code.findbugs/jsr305 "1.3.9"]
[com.google.guava/guava "14.0.1"]
[com.google.protobuf/protobuf-java "2.4.1"]
[org.json/json "20090211"]
[org.clojure/data.json "0.2.3"]
[org.clojure/google-closure-library "0.0-20130212-95c19e7f0f5f"]
[org.clojure/google-closure-library-third-party "0.0-20130212-95c19e7f0f5f"]
[org.clojure/tools.reader "0.8.0"]
[org.mozilla/rhino "1.7R4"]
[org.clojure/tools.nrepl "0.2.3" :exclusions [[org.clojure/clojure]]]

There's literally nothing to my project.clj:

(defproject hellocljs "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/clojurescript "0.0-2080"]
[org.clojure/clojure "1.5.1"]]
:plugins [
[lein-cljsbuild "1.0.1-SNAPSHOT"]]
:source-paths ["src/clj"]
:cljsbuild {
:builds [{
; The path to the top-level ClojureScript source directory:
:source-paths ["src/cljs"]
; The standard ClojureScript compiler options:
; (See the ClojureScript compiler documentation for details.)
:compiler {
:output-to "public/js/hellocljs.cljs" ; default: target/cljsbuild-main.js
:optimizations :whitespace
:pretty-print true}}]}
)

Plain Clojure works just fine.

@vhbit

This comment has been minimized.

Copy link

commented Dec 3, 2013

Same problem here

@ibdknox

This comment has been minimized.

Copy link
Member

commented Dec 3, 2013

There was another breaking change in the cljs compiler, if you use 2030, it'll be fine. The next release will try to be a little more robust on the 2030+ ones.

@mharju

This comment has been minimized.

Copy link

commented Dec 4, 2013

Changing to 2030 worked for me. Thanks!

@machielg

This comment has been minimized.

Copy link

commented Dec 8, 2013

I added [org.clojure/clojurescript "0.0-2030"] to my dependencies. Cleared out .m2/repository and included 0.7.10 of the reader but still getting the
"Unable to resolve var: reader/alias-map in this context, compiling:(cljs/analyzer.clj:1219:9)"
exception

My deps tree

 [clojure-complete "0.2.3" :exclusions [[org.clojure/clojure]]]
 [compojure "1.1.6" :exclusions [[org.clojure/tools.reader]]]
   [clout "1.1.0"]
   [org.clojure/core.incubator "0.1.0"]
   [org.clojure/tools.macro "0.1.0"]
   [ring/ring-core "1.2.1"]
     [clj-time "0.4.4"]
       [joda-time "2.1"]
     [commons-fileupload "1.3"]
     [commons-io "2.4"]
 [hiccup "1.0.4"]
 [org.clojure/clojure "1.5.1"]
 [org.clojure/clojurescript "0.0-2030"]
   [com.google.javascript/closure-compiler "v20130603"]
     [args4j "2.0.16"]
     [com.google.code.findbugs/jsr305 "1.3.9"]
     [com.google.guava/guava "14.0.1"]
     [com.google.protobuf/protobuf-java "2.4.1"]
     [org.json/json "20090211"]
   [org.clojure/data.json "0.2.3"]
   [org.clojure/google-closure-library "0.0-20130212-95c19e7f0f5f"]
     [org.clojure/google-closure-library-third-party "0.0-20130212-95c19e7f0f5f"]
   [org.clojure/tools.reader "0.7.10"]
   [org.mozilla/rhino "1.7R4"]
 [org.clojure/java.jdbc "0.2.3"]
 [org.clojure/tools.nrepl "0.2.3" :exclusions [[org.clojure/clojure]]]
 [org.xerial/sqlite-jdbc "3.7.2"]
 [ring-mock "0.1.5"]
   [ring/ring-codec "1.0.0"]
     [commons-codec "1.6"]
 [ring-server "0.3.1"]
   [ring-refresh "0.1.2"]
     [watchtower "0.1.1"]
   [ring "1.2.1"]
     [ring/ring-jetty-adapter "1.2.1"]
       [org.eclipse.jetty/jetty-server "7.6.8.v20121106"]
         [org.eclipse.jetty.orbit/javax.servlet "2.5.0.v201103041518"]
         [org.eclipse.jetty/jetty-continuation "7.6.8.v20121106"]
         [org.eclipse.jetty/jetty-http "7.6.8.v20121106"]
           [org.eclipse.jetty/jetty-io "7.6.8.v20121106"]
             [org.eclipse.jetty/jetty-util "7.6.8.v20121106"]
     [ring/ring-servlet "1.2.1"]
 [ring/ring-devel "1.2.1"]
   [clj-stacktrace "0.2.5"]
   [ns-tracker "0.2.1"]
     [org.clojure/java.classpath "0.2.0"]
     [org.clojure/tools.namespace "0.1.3"]
@sidharthkhattri

This comment has been minimized.

Copy link

commented Feb 2, 2014

Using LightTable 0.6.2

Made a new project on terminal:
lein new compojure-app guestbook

Opened it on LightTable and when trying to use Ctrl+Enter, I get this error.
Couldn't find anything on google. Can someone help?

We couldn't connect.

Looks like there was an issue trying to connect to the project. Here's what we got:
final project: ([org.clojure/clojure "1.5.1"] [compojure/compojure "1.1.6"] [hiccup/hiccup "1.0.5"] [ring-server/ring-server "0.3.1"] [org.clojure/tools.nrepl "0.2.3" :exclusions ([org.clojure/clojure])] [clojure-complete/clojure-complete "0.2.3" :exclusions ([org.clojure/clojure])] [ring-mock/ring-mock "0.1.5"] [ring/ring-devel "1.2.1"] [lein-light-nrepl/lein-light-nrepl "0.0.13"] [org.clojure/tools.reader "0.8.3"])
Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: reader/alias-map in this context, compiling:(cljs/analyzer.clj:1498:11)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context, compiling:(/tmp/form-init2952886155223475485.clj:1:3458)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.eval(Compiler.java:6616)
at clojure.lang.Compiler.eval(Compiler.java:6609)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:294)
at clojure.main$init_opt.invoke(main.clj:299)
at clojure.main$initialize.invoke(main.clj:327)
at clojure.main$null_opt.invoke(main.clj:362)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context
at clojure.lang.Util.runtimeException(Util.java:219)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:650)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
... 33 more
clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
at clojure.core$ex_info.invoke(core.clj:4327)
at leiningen.core.eval$fn__2081.invoke(eval.clj:226)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.repl$repl.doInvoke(repl.clj:253)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at leiningen.light_nrepl$light.doInvoke(light_nrepl.clj:56)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at leiningen.light_nrepl$_main.doInvoke(light_nrepl.clj:68)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at leiningen.light_nrepl.main(Unknown Source)

close

@ruseel

This comment has been minimized.

Copy link

commented Feb 19, 2014

same with @sidharthkhattri (but with LightTable 0.6.4)

@tow8ie

This comment has been minimized.

Copy link

commented Mar 1, 2014

Have the same problem as @sidharthkhattri and @ruseel (using LightTable 0.6.4). Described my problem in more detail at http://forums.pragprog.com/forums/308/topics/12552

@raphonic

This comment has been minimized.

Copy link

commented Mar 2, 2014

I have the same problem as @tow8ie on 0.6.4 on OS X(mountain lion). I've tried using [clojure "1.6.0-beta2"] but ended up with the same problem.

@madeye-matt

This comment has been minimized.

Copy link

commented Apr 27, 2014

I realise this is an old thread but as I have been faced with the same problem and have worked it out I thought I'd share. Light Table is extremely sensitive to which version of Clojurescript you are using. I don't know whether this is down to the Light Table people or the Clojurescript people or both (breaking changes from either could cause this) but it's unfortunately the case.

I am using Light Table 0.6.5 and by a process of elimination I have worked out that the latest version of Clojurescript I can use is 0.0-2173. If I use any later version I get the error:

Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: reader/alias-map in this context, compiling:(cljs/analyzer.clj:1499:11)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context, compiling:(/tmp/form-init6985861904664072984.clj:1:4820)

I'd be much more up for using Light Table if it didn't have this ugly dependency on particular Clojurescript versions, but until either or both of these have stabilised could we have some kind of compatibility table showing which versions of Light Table can be used with which versions of Clojurescript?

e.g.
LightTable Clojurescript
0.6.5 0.0-2173

@strangemonad

This comment has been minimized.

Copy link

commented May 18, 2014

I can second what @madeye-matt recently posted.

I'm on 0.6.5 (standalone) and just bumped the version of clojurescript in my project 0.0-2202. Dropping my project's cljs dep back to 0.0-2173 allowed light table to start a Clojure client / repl again.

I'm not familiar enough with the LightTable innards. Is there a way to bundle a particular version of clojurescript that LT uses that's isolated from the project's deps?

@ShepBook

This comment has been minimized.

Copy link

commented May 28, 2014

Running "lein clean" from the project directory in my terminal seems to have fixed this for myself and the others in the pragprog forums.

Hopefully that will help some who stumble across this tread.

@ohhhsnap

This comment has been minimized.

Copy link

commented Jun 7, 2014

@ShepBook Thanks. "lein clean" worked for me as well. I also changed the clojure dependency from 1.6 to 1.5.1

@lostpupil

This comment has been minimized.

Copy link

commented Jul 15, 2014

Will I came across with this problem again, I found I have successfully run lein ring server, after that I just cannot connect with LightTable, so I tried @ShepBook it just works fine.

@gzmask

This comment has been minimized.

Copy link

commented Aug 16, 2014

Same problem.

my project.clj:
(defproject tsask "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"}
:plugins [[lein-cljsbuild "0.3.2"]
[lein-ring "0.8.5"]]
:dependencies [[ring/ring "1.1.8"]
[ring/ring-jetty-adapter "1.1.8"]
[ring-mock "0.1.5"]
[ring/ring-json "0.3.1"]
[hiccup "1.0.3"]
[com.draines/postal "1.11.0"]
[compojure "1.1.5"]
[mysql/mysql-connector-java "5.1.25"]
[org.xerial/sqlite-jdbc "3.7.2"]
[org.clojure/java.jdbc "0.3.0-alpha4"]
[org.clojure/clojure "1.5.1"]
[scriptjure "0.1.24"]
[enfocus "2.0.0-beta1"]
[enlive "1.1.4"]
[clj-http "0.7.7"]
[digest "1.4.3"]
[hickory "0.5.3"]
[incanter "1.5.4"]]
:source-paths ["src/clj"]
:ring {:handler tsask.core/app
:auto-reload? true
:adapter {:port 3000}
:nrepl {:start? true :port 7000}}
:main tsask.core
:profiles {:uberjar {:aot :all}})

OSX 10.9.4

We couldn't connect.

Looks like there was an issue trying to connect to the project. Here's what we got:
final project: {:compile-path /Users/gzmask/project/tsaskforms/target/classes, :group tsask, :license {:name Eclipse Public License, :url http://www.eclipse.org/legal/epl-v10.html}, :global-vars {}, :checkout-deps-shares [:source-paths :test-paths :resource-paths :compile-path #'leiningen.core.classpath/checkout-deps-paths], :repl-options {:nrepl-middleware [lighttable.nrepl.handler/lighttable-ops], :init (clojure.core/swap! lighttable.nrepl.core/my-settings clojure.core/merge {:name tsask 0.1.0-SNAPSHOT, :project (quote {:compile-path /Users/gzmask/project/tsaskforms/target/classes, :group tsask, :license {:name Eclipse Public License, :url http://www.eclipse.org/legal/epl-v10.html}, :global-vars {}, :checkout-deps-shares [:source-paths :test-paths :resource-paths :compile-path #'leiningen.core.classpath/checkout-deps-paths], :dependencies ([ring/ring 1.1.8] [ring/ring-jetty-adapter 1.1.8] [ring-mock/ring-mock 0.1.5] [ring/ring-json 0.3.1] [hiccup/hiccup 1.0.3] [com.draines/postal 1.11.0] [compojure/compojure 1.1.5] [mysql/mysql-connector-java 5.1.25] [org.xerial/sqlite-jdbc 3.7.2] [org.clojure/java.jdbc 0.3.0-alpha4] [org.clojure/clojure 1.5.1] [scriptjure/scriptjure 0.1.24] [enfocus/enfocus 2.0.0-beta1] [enlive/enlive 1.1.4] [clj-http/clj-http 0.7.7] [digest/digest 1.4.3] [hickory/hickory 0.5.3] [incanter/incanter 1.5.4] [org.clojure/tools.nrepl 0.2.3 :exclusions ([org.clojure/clojure])] [clojure-complete/clojure-complete 0.2.3 :exclusions ([org.clojure/clojure])]), :plugin-repositories [[central {:snapshots false, :url http://repo1.maven.org/maven2/}] [clojars {:url https://clojars.org/repo/}]], :test-selectors {:default (constantly true)}, :target-path /Users/gzmask/project/tsaskforms/target, :name tsask, :deploy-repositories [[clojars {:username :gpg, :url https://clojars.org/repo/, :password :gpg}]], :root /Users/gzmask/project/tsaskforms, :offline? false, :source-paths (/Users/gzmask/project/tsaskforms/src/clj), :certificates [clojars.pem], :ring {:auto-reload? true, :nrepl {:port 7000, :start? true}, :handler tsask.core/app, :adapter {:port 3000}}, :version 0.1.0-SNAPSHOT, :jar-exclusions [#"^."], :profiles {:uberjar {:aot :all}}, :prep-tasks [javac compile], :url http://example.com/FIXME, :repositories [[central {:snapshots false, :url http://repo1.maven.org/maven2/}] [clojars {:url https://clojars.org/repo/}]], :resource-paths (/Users/gzmask/project/tsaskforms/dev-resources /Users/gzmask/project/tsaskforms/resources), :uberjar-exclusions [#"(?i)^META-INF/[^/].(SF|RSA|DSA)$"], :main tsask.core, :jvm-opts [], :eval-in :subprocess, :plugins ([lein-cljsbuild/lein-cljsbuild 0.3.2] [lein-ring/lein-ring 0.8.5]), :native-path /Users/gzmask/project/tsaskforms/target/native, :description FIXME: write description, :uberjar-merge-with {META-INF/plexus/components.xml leiningen.uberjar/components-merger, data_readers.clj leiningen.uberjar/clj-map-merger}, :test-paths (/Users/gzmask/project/tsaskforms/test), :clean-targets [:target-path]})})}, :dependencies ([ring/ring 1.1.8] [ring/ring-jetty-adapter 1.1.8] [ring-mock/ring-mock 0.1.5] [ring/ring-json 0.3.1] [hiccup/hiccup 1.0.3] [com.draines/postal 1.11.0] [compojure/compojure 1.1.5] [mysql/mysql-connector-java 5.1.25] [org.xerial/sqlite-jdbc 3.7.2] [org.clojure/java.jdbc 0.3.0-alpha4] [org.clojure/clojure 1.5.1] [scriptjure/scriptjure 0.1.24] [enfocus/enfocus 2.0.0-beta1] [enlive/enlive 1.1.4] [clj-http/clj-http 0.7.7] [digest/digest 1.4.3] [hickory/hickory 0.5.3] [incanter/incanter 1.5.4] [org.clojure/tools.nrepl 0.2.3 :exclusions ([org.clojure/clojure])] [clojure-complete/clojure-complete 0.2.3 :exclusions ([org.clojure/clojure])] [lein-light-nrepl/lein-light-nrepl 0.0.18] [org.clojure/tools.reader 0.8.3]), :plugin-repositories [[central {:snapshots false, :url http://repo1.maven.org/maven2/}] [clojars {:url https://clojars.org/repo/}]], :test-selectors {:default (constantly true)}, :target-path /Users/gzmask/project/tsaskforms/target, :name tsask, :deploy-repositories [[clojars {:username :gpg, :url https://clojars.org/repo/, :password :gpg}]], :root /Users/gzmask/project/tsaskforms, :offline? false, :source-paths (/Users/gzmask/project/tsaskforms/src/clj), :certificates [clojars.pem], :ring {:auto-reload? true, :nrepl {:port 7000, :start? true}, :handler tsask.core/app, :adapter {:port 3000}}, :version 0.1.0-SNAPSHOT, :jar-exclusions [#"^."], :profiles {:uberjar {:aot :all}}, :prep-tasks [javac compile], :url http://example.com/FIXME, :repositories [[central {:snapshots false, :url http://repo1.maven.org/maven2/}] [clojars {:url https://clojars.org/repo/}]], :resource-paths (/Users/gzmask/project/tsaskforms/dev-resources /Users/gzmask/project/tsaskforms/resources), :uberjar-exclusions [#"(?i)^META-INF/[^/].(SF|RSA|DSA)$"], :main tsask.core, :jvm-opts [], :eval-in :subprocess, :plugins ([lein-cljsbuild/lein-cljsbuild 0.3.2] [lein-ring/lein-ring 0.8.5]), :native-path /Users/gzmask/project/tsaskforms/target/native, :description FIXME: write description, :uberjar-merge-with {META-INF/plexus/components.xml leiningen.uberjar/components-merger, data_readers.clj leiningen.uberjar/clj-map-merger}, :test-paths (/Users/gzmask/project/tsaskforms/test), :clean-targets [:target-path]}
Error loading lighttable.nrepl.handler: Could not locate cljs/env__init.class or cljs/env.clj on classpath:
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context, compiling:(/private/var/folders/zt/58jb_qv978l2w4m0m7v6q3700000gn/T/form-init7776090768598010722.clj:1:5000)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.eval(Compiler.java:6616)
at clojure.lang.Compiler.eval(Compiler.java:6609)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:294)
at clojure.main$init_opt.invoke(main.clj:299)
at clojure.main$initialize.invoke(main.clj:327)
at clojure.main$null_opt.invoke(main.clj:362)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context
at clojure.lang.Util.runtimeException(Util.java:219)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:650)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
... 33 more
clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
at clojure.core$ex_info.invoke(core.clj:4327)
at leiningen.core.eval$fn__3532.invoke(eval.clj:226)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.repl$repl.doInvoke(repl.clj:261)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at leiningen.light_nrepl$light.doInvoke(light_nrepl.clj:56)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at leiningen.light_nrepl$_main.doInvoke(light_nrepl.clj:68)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at leiningen.light_nrepl.main(Unknown Source)

close

@dtonhofer

This comment has been minimized.

Copy link

commented Aug 21, 2014

Light Table version 0.6.7 (Binary version 0.8.4 ... what is that?)
roracle JDK 1.8.0-20, clojure 1.6.0, leiningen 2.4.3

And the jar for clojurescript (not sure whether relevant) is:
.m2/repository/org/clojure/clojurescript/0.0-2202/clojurescript-0.0-2202.jar

Although for some reason this pom is also lying around:
.m2/repository/org/clojure/clojurescript/0.0-1586/clojurescript-0.0-1586.pom

Try this:

$ lein new compojure-app guestbook
$ lein ring server

Ok. CTRL-C. Start LightTable. Try to connect to the project.clj. NOPE:

Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: reader/alias-map in this context, compiling:(cljs/analyzer.clj:1499:11)
Caused by: java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context

As per @ShepBook

$ lein clean

Reconnect. Works. We will see whether this holds....

cldwalker added a commit to LightTable/Clojure that referenced this issue Sep 12, 2015

No need for tools.reader dep in runner
We have tools.reader in lein-light-nrepl so better to rely on one
version than two when debugging. This was added to fix LightTable/LightTable#890.
Example in issue, specifically new compojure app, works fine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.