3

有时我尝试在 IntelliJ 中运行 Clojure 程序,但出现以下错误:

(.deleteOnExit (java.io.File. "/home/matan.bl/.IdeaIC15/system/tmp/form-init7886362698780123516.clj"))
(do (set! *warn-on-reflection* nil)
    (set! *warn-on-reflection* nil)
    nil
    (clojure.core/doseq [namespace1387 (quote
                                        (sparkling.serialization
                                         sparkling.destructuring))]
      (clojure.core/binding [clojure.core/*out*  clojure.core/*err*]
        (clojure.core/println "Compiling" namespace1387))
      (try
        (clojure.core/compile namespace1387)
        (catch java.lang.Throwable 
            t__8048__auto__ (clojure.core/binding [clojure.core/*out* 
                                                   clojure.core/*err*]
                              (clojure.core/println (.getMessage
                                                     t__8048__auto__)))
            (throw t__8048__auto__))))
    (do nil
        (try
          (clojure.core/require
           (quote  clojure.tools.nrepl.server))
          (catch
              java.lang.Throwable t__11819__auto__
            (clojure.core/println "Error loading"                    
                                  (clojure.core/str (quote  clojure.tools.nrepl.server) ":")
                                  (clojure.core/or (.getMessage t__11819__auto__)
                                                   (clojure.core/type
                                                    t__11819__auto__)))))
        (try  (clojure.core/require (quote complete.core))
              (catch java.lang.Throwable  t__11819__auto__
                (clojure.core/println "Error loading"
                                      (clojure.core/str
                                       (quote
                                        complete.core) ":")
                                      (clojure.core/or (.getMessage t__11819__auto__) 
                                                       (clojure.core/type t__11819__auto__)))))
        nil)
    (clojure.core/let
        [server__11814__auto__ (clojure.tools.nrepl.server/start-server
                                :bind
                                "127.0.0.1" :port 0 :ack-port 42520 :handler
                                (clojure.tools.nrepl.server/default-handler))
         port__11815__auto__   (:port server__11814__auto__)
         repl-port-file__11816__auto__ (clojure.core/apply clojure.java.io/file
                                                           ["/home/matan.bl/projects/af_sparkling-river"
                                                            ".nrepl-port"])
         legacy-repl-port__11817__auto__ (if (.exists  (clojure.java.io/file
                                                        "/home/matan.bl/projects/af_sparkling- river/target"))
                                           (clojure.java.io/file 
                                            "/home/matan.bl/projects/af_sparkling-river/target" "repl-port"))] 
      (clojure.core/when true
        (clojure.core/println
         "nREPL server started on port"
         port__11815__auto__
         "on host"
         "127.0.0.1"
         (clojure.core/str "- nrepl://" "127.0.0.1" ":" port__11815__auto__)))
      (clojure.core/spit 
       (clojure.core/doto repl-port-file__11816__auto__ .deleteOnExit) 
       port__11815__auto__)
      (clojure.core/when
          legacy-repl-port__11817__auto__
        (clojure.core/spit (clojure.core/doto
                               legacy-repl-port__11817__auto__
                             .deleteOnExit)
                           port__11815__auto__))
        (clojure.core/deref (clojure.core/promise))))

你知道这个错误是什么意思以及如何解决吗?

4

1 回答 1

1

我在打字时看到过这样的错误

(-main ....) 

进入 Cursive-clojure 中的 REPL,而无需先单击 switch repl to namespace 按钮。还要确保您已在同一菜单中计时“加载文件”。

于 2016-02-09T23:27:05.787 回答