如何解决无法在'lein new figwheel foo---reagent'中编译
我想使用agent和figwheel启动一个项目,并且我之前已经使用该命令完成了该项目,并且该项目已经奏效,实际上它们仍然可以工作。但是随着新版本的发布,部分依赖项的配置和版本发生了变化,并且不再以“ lein fighwheel”开头。这是我的project.clj
(defproject ajedrez1 "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:min-lein-version "2.9.1"
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.773"]
[org.clojure/core.async "0.4.500"]
[reagent "0.10.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]]
:plugins [[lein-figwheel "0.5.20"]
[lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]]
:source-paths ["src"]
:cljsbuild {:builds
[{:id "dev"
:source-paths ["src"]
:figwheel {:on-jsload "ajedrez1.core/on-js-reload"
:open-urls ["http://localhost:3449/index.html"]}
:compiler {:main ajedrez1.core
:target :bundle
:asset-path "js/compiled/out"
:output-to "resources/public/js/compiled/out/index.js"
:output-dir "resources/public/js/compiled/out"
:bundle-cmd {:none ["npx.cmd" "webpack" "--mode=development"]
:default ["npx.cmd" "webpack"]}
:source-map-timestamp true
:preloads [devtools.preload]}}
{:id "min"
:source-paths ["src"]
:compiler {:output-to "resources/public/js/compiled/ajedrez1.js"
:main ajedrez1.core
:optimizations :advanced
:pretty-print false}}]}
:figwheel {:css-dirs ["resources/public/css"] ;; watch and update CSS}
:profiles {:dev {:dependencies [[binaryage/devtools "1.0.0"]
[figwheel-sidecar "0.5.20"]]
:source-paths ["src" "dev"]
:clean-targets ^{:protect false} ["resources/public/js/compiled"
:target-path]}})
它抛出:
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 - dev
Figwheel: Cleaning build - dev
Compiling build :dev to "resources/public/js/compiled/out/index.js" from ["src"]...
Failed to compile build :dev from ["src"] in 16.531 seconds.
---- Exception ----
clojure.lang.ExceptionInfo : :build-cmd :none failed
java.io.IOException : Cannot run program "npx.cmd": CreateProcess error=2,El sistema no puede encontrar el archivo especificado
java.io.IOException : CreateProcess error=2,El sistema no puede encontrar el archivo especificado
我尝试退出:
:exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]
:target :bundle
:bundle-cmd {:none ["npx.cmd" "webpack" "--mode=development"]
:default ["npx.cmd" "webpack"]}
因为先前的项目没有该文件并且已成功编译,但浏览器仅显示“ Figwheel模板签出您的开发者控制台”。控制台上显示“无法加载资源:服务器以状态404(未找到)响应”。
添加后,我尝试使用“ lein clen”
:clean-targets ^{:protect false} [:target-path
[:cljsbuild :builds :app :compiler
:output-dir]
[:cljsbuild :builds :app :compiler
:output-to]]
但相同。
以防万一,当我多次评估同一个表达式时,repl遇到了堆栈溢出问题,每次重复计算的时间都会增加。我必须定期重新启动它。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。