2016-08-25 110 views
1

新的Linux(centos7),新lighttable,新的雷音,新項目:無法理解defproject?

clojure.lang.Compiler $ CompilerException:了java.lang.RuntimeException:無法解析符號:defproject在這種情況下,編譯:(/home/zzz/nnn/lighttable/project.clj:1:1)

這是項目:

(defproject lighttable "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"]]) 

經過幾年努力的Clojure的,有一個項目,是在刺。 (當然不是這個):我錯過了什麼?

+0

你是想以任何方式運行你的project.clj,或者你是否已經將它作爲源的一部分?該文件不應該直接運行(基本上),但'lein'將其作爲描述來執行。 – cfrick

回答

2

你可以從乾淨的目錄再試一次嗎?這似乎是爲我工作:

~/tmp9 > lein new app lighttable 
Generating a project called lighttable based on the 'app' template. 
~/tmp9 > cd lighttable 
~/tmp9/lighttable > lein run 
Hello, World! 
~/tmp9/lighttable > cat project.clj 
(defproject lighttable "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 lighttable.core 
    :target-path "target/%s" 
    :profiles {:uberjar {:aot :all}}) 

我注意到你有兩個:url條目,缺少一些其他的東西。你是否使用命令lein new app lighttable創建它?

+1

第二個':url'格式不佳 – cfrick

0

突然,它沒有任何明顯的原因運行。