首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么这个用Clojure,ClojureSript,Fig轮,Lein构建的web应用程序在源代码版本之后没有在浏览器上更新呢?

为什么这个用Clojure,ClojureSript,Fig轮,Lein构建的web应用程序在源代码版本之后没有在浏览器上更新呢?
EN

Stack Overflow用户
提问于 2022-08-25 17:00:40
回答 2查看 128关注 0票数 1

我正在前端上看埃里克·诺曼德的课程/教程。这门课程是付费的私人服务。

然而,他正在GitHub,这一个上使用公共回购。

在克隆和执行lein fig-dev之后,该项目似乎已经成功构建:

代码语言:javascript
运行
复制
2022-08-25 13:46:47.988:INFO::main: Logging initialized @3006ms to org.eclipse.jetty.util.log.StdErrLog
[Figwheel] Validating figwheel-main.edn
[Figwheel] figwheel-main.edn is valid \(ツ)/
[Figwheel] Compiling build dev to "resources/public/js/compiled/app.js"
[Figwheel] Successfully compiled build dev to "resources/public/js/compiled/app.js" in 1.33 seconds.
[Figwheel] Watching paths: ("src") to compile build - dev
[Figwheel:SEVERE] /private/var/folders/fh/7d_1drwd2ps3zw03j9ftkqs80000gn/T/jna1153974339277798676.tmp: dlopen(/private/var/folders/fh/7d_1drwd2ps3zw03j9ftkqs80000gn/T/jna1153974339277798676.tmp, 0x0001): tried: '/private/var/folders/fh/7d_1drwd2ps3zw03j9ftkqs80000gn/T/jna1153974339277798676.tmp' (fat file, but missing compatible architecture (have (unknown,i386,x86_64), need (arm64e)))
[Figwheel] Starting Server at http://localhost:3449
[Figwheel] Starting REPL
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Figwheel Main Controls:
          (figwheel.main/stop-builds id ...)  ;; stops Figwheel autobuilder for ids
          (figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
          (figwheel.main/reset)               ;; stops, cleans, reloads config, and starts autobuilder
          (figwheel.main/build-once id ...)   ;; builds source one time
          (figwheel.main/clean id ...)        ;; deletes compiled cljs target files
          (figwheel.main/status)              ;; displays current state of system
Figwheel REPL Controls:
          (figwheel.repl/conns)               ;; displays the current connections
          (figwheel.repl/focus session-name)  ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
    Docs: (doc function-name-here)
    Exit: :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Opening URL http://localhost:3449
ClojureScript 1.10.764

cljs.user=> (js/alert "hello")
nil

--这是我所有的日志(作为下面的注释提出的问题)。

浏览器启动(我使用的是Brave),应用程序似乎成功地加载到http://localhost:3449//上。

我有一个REPL程序,我甚至可以在本地主机的浏览器上执行这样的警告:

代码语言:javascript
运行
复制
cljs.user=> (js/alert "hello")
nil

好的。唯一的问题是当我编辑sorce代码时,就像他在视频上所做的那样。在他的例子中,这些更改会对浏览器产生影响。在我的案子上,他们没有。什么都没发生。

如果从零开始重建所有东西,那么只能看到更改,。

在其他项目中,我成功地看到了变化的发生,但我在那里使用了shadow-cljs

我该怎么解决这个问题?

我正在使用Macbook M1,macOS蒙特利12.5.1

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-08-28 14:51:49

多亏了@SearCorfield,我设法解决了这个问题。

此外,Eric (课程的创建者和存储库的作者)刚刚更新了project.clj文件,使其具有[com.bhauman/figwheel-main "0.2.18"]。现在工作顺利了!

票数 1
EN

Stack Overflow用户

发布于 2022-08-26 00:32:57

figwheel-main版本中使用的Hawk不支持M1 Mac --这就是JNA相关的严重错误在日志中的含义。

figwheel-main的当前版本是0.2.18,所以您可以在project.clj中尝试而不是0.2.12。根据变化量,0.2.14从鹰式切换到观赏者,因此它可以修复M1兼容性问题。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73491246

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档