首页 > 解决方案 > Lein figwheel 在创建新的 cljs 命名空间时编译错误“推回缓冲区溢出”

问题描述

我在这里有一个开源应用程序的轻量级无花果配置https://github.com/milleva/LyricMasterhttps://github.com/milleva/LyricMaster/tree/d6d534ff02f098d23c435152627247e753bfb341在发布此内容时)。Pushback buffer overflow突然间,对我来说,没有明显的原因,每当我尝试添加任何新的命名空间时,figwheel 都会遇到编译错误。

输出lein figwheel

Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid ;)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - lyric-frontend
Compiling build :lyric-frontend to "resources/public/js/lyric_frontend.js" from ["src"]...
Failed to compile build :lyric-frontend from ["src"] in 0.793 seconds.
----  Could not Read  src/lyric_frontend/thingy.cljs   line:1  column:27  ----

  Pushback buffer overflow

  1  (ns lyric-frontend.thingy)
                               ^--- Pushback buffer overflow
  2  
  3  (def test "test")

----  Reader Error : Please see src/lyric_frontend/thingy.cljs  ----

这是在几天后回到编码之后发生的。我已经检查了许多早期的提交,但问题仍然存在。

项目.clj:

(defproject lyric-master "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.9.0"]
                 [org.clojure/data.json "1.0.0"]
                 [clj-http "3.12.0"]
                 [metosin/reitit "0.5.12"]
                 [javax.servlet/servlet-api "2.5"]
                 [ring "1.9.0"]
                 [ring/ring-json "0.5.0"]
                 [reagent "1.0.0"]
                 [jumblerg/ring-cors "2.0.0"]

                 [org.clojure/clojurescript "1.10.312"]
                 [cljs-http "0.1.46"]
                 [stylefy "2.2.1"]]

  :plugins [[lein-cljsbuild "1.1.4"
             :exclusions [org.clojure/clojure]]
            [lein-figwheel "0.5.20"]]

  :clean-targets ^{:protect false} ["resources/public/js/out"
                                    "resources/public/js/lyric_frontend.js"
                                    :target-path]

  :source-paths ["src"]
  :main "lyric-backend.core/start"

  :cljsbuild {:builds [{:id "lyric-frontend"
                        :source-paths ["src"]
                        :figwheel true
                        :compiler {
                                   :main lyric-frontend.core
                                   :asset-path "js/out"
                                   :output-to "resources/public/js/lyric_frontend.js"
                                   :output-dir "resources/public/js/out"
                                   :source-map-timestamp true}}]}

  :figwheel {:css-dirs ["resources/public/css"]
             :open-file-command "emacsclient"})

src/lyric_frontend/thingy.cljs(私有代码,不需要任何地方):

(ns lyric-frontend.thingy)

(def test "test")

标签: clojureclojurescriptleiningenfigwheel

解决方案


推荐阅读