【问题标题】:why is this lein new template is failing为什么这个 lein 新模板失败了
【发布时间】:2016-09-06 15:54:07
【问题描述】:

我刚开始使用 clojure Web 开发,但是在第 1 步上卡住了。

D:\cloj\work>lein new luminus guestbook +h2
Could not find artifact luminus:lein-template:jar:? in central    
(https://repo1.maven.org/maven2/)
Could not find artifact luminus:lein-template:jar:? in clojars 
(https://clojars.org/repo/)
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
  1. 我可以在 clojars 中看到模板 https://clojars.org/repo/luminus/lein-template/
  2. 我没有使用代理。
  3. 我的 .lein/profiles.clj 有以下内容

    {:用户 { :java-cmd "C:\Program Files\Java\jdk1.8.0_65\bin\java.exe" :插件 [ [lein-古代“0.6.10”] [luminus/lein-模板​“2.9.10.74”​] ] }
    }

我错过了什么! 谢谢

【问题讨论】:

  • hm,它可以在我的电脑 (linux) 上运行 - 我在 .lein/profiles.clj 中没有针对 luminus/lein-template 的插件条目,请尝试删除它
  • 谢谢。我删除了它,它起作用了。
  • 你们中的一个人应该将其添加为被接受的答案。帮助那些从谷歌来到这里遇到同样问题的人

标签: clojure leiningen luminus


【解决方案1】:

我在阅读使用 Clojure 进行 Web 开发电子书时遇到了同样的问题。问题是我从电子书中复制粘贴了profiles.clj 配置,这导致包含一些不可见的字符,从而弄乱了配置。我用十六进制查看器验证了这一点。

解决方案是手动输入配置,如果你很懒,可以从这里复制粘贴 :)

{:user 
    {:plugins [
            [luminus/lein-template "2.9.10.74"]
        ]
    }
}

当然,您也可以省略这一点,但您将使用最新版本,该版本可能与本书编写时有所不同。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-08
    • 1970-01-01
    • 2013-03-06
    • 1970-01-01
    • 2021-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多