【问题标题】:Failing to connect to compojure-app with LightTable无法使用 LightTable 连接到 compojure-app
【发布时间】:2014-08-27 15:12:48
【问题描述】:

我刚刚在“使用 Clojure 进行 Web 开发”一书之后运行了“lein new compojure-app guestbook”。这本书一步一步用灯表连接到我的 Clojure 项目。但是,当我尝试此操作时,会出现以下对我来说毫无意义的错误。

Here is the error I'm getting

【问题讨论】:

    标签: clojure leiningen lighttable


    【解决方案1】:

    你的错误

    对于搜索引擎,这里是您错误相关部分的副本:

    Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: reader/*alias-map* in this context
    

    原因

    Lighttable 已升级为使用更新的tools.reader

    我找到了两个资源:

    1. 一个适用的github issue,您可能会觉得有帮助。
    2. forum thread 涵盖了这个问题(在上面的 github 问题中提到)。

    总结解决方案

    一些人通过在他们的项目目录中简单地运行lein clean 解决了这个问题。

    如果lein clean没有为你解决,那么这里是来自论坛的扩展解决方案:

    在 project.clj 中。替换

    [合成“1.1.6”]

    [compojure “1.1.6” :exclusions [org.clojure/tools.reader]]

    并添加到 :dependencies 列表

    [org.clojure/tools.reader “0.7.10”]

    原因似乎是 LightTable 期望这个版本的 tools.reader,但 Compojure 引入了 0.7.3 版

    使用此解决方案后,您可能希望再次运行lein clean

    【讨论】:

    • 我只需要运行 lein clean
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-04
    • 2016-04-17
    • 2016-10-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多