Closed juxt-jp closed 2 years ago
Upgrade. You have an absolute ancient version it seems cli version: 2.3.30
. hawk
was removed a very long time ago.
I just bumped shadow-cljs
and react
deps in the project. There is also information in the episode notes to always use latests version of shadow-cljs
. Additionally if you are using M1 Pro or Ultra you will also need a newer version of Java.
I'm seeing the same error on my M1 machine. shadow-cljs --cli-info shows that I'm on version 2.10.22 of the cli and have openjdk 11. Here's the edn output.
Are you using hawk
for anything? Could you paste your shadow-cljs.edn
?
Here you go, but this is happening on an untouched create-cljs-app project.
{:builds
{:app {:asset-path "/js"
:modules {:main {:init-fn app.core/main}}
:output-dir "public/js"
:target :browser}
:cards {:asset-path "/js"
:modules {:main {:init-fn app.cards/main}}
:compiler-options {:devcards true}
:output-dir "public/js"
:target :browser}
:test {:ns-regexp "app.cards"
:output-to "out/test.js"
:target :node-test}
:e2e {:ns-regexp "e2e.*"
:output-to "out/e2e.js"
:target :node-test}}
:dependencies [[reagent "0.8.1"]
[devcards "0.2.6"]]
:dev-http {3000 "public"}
:nrepl {:port 3333}
:source-paths ["src"]}
I wasn't aware of create-cljs-app project. The official way is to use
npx create-cljs-project acme-app
Maybe it would be worth to create an issue on the cretae-cljs-app
repo. I see that this project is using shadow-cljs in version 2.11.4
.
It worked with the new version.
% ncu -u
Upgrading /Users/makoto/clojure/learn-reagent-course-files/my-store/package.json
[====================] 4/4 100%
react ^16.14.0 → ^18.2.0
react-dom ^16.14.0 → ^18.2.0
shadow-cljs 2.3.30 → 2.20.2
Run npm install to install new versions.
% npm update
added 3 packages, removed 107 packages, changed 7 packages, and audited 100 packages in 1s
3 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
% npx shadow-cljs browser-repl
shadow-cljs - config: /Users/makoto/clojure/learn-reagent-course-files/my-store/shadow-cljs.edn
shadow-cljs - updating dependencies
shadow-cljs - dependencies updated
shadow-cljs - HTTP server available at http://localhost:3000
shadow-cljs - server version: 2.20.2 running at http://localhost:9630
shadow-cljs - nREPL server started on port 3333
[:browser-repl] Configuring build.
[:browser-repl] Compiling ...
[:browser-repl] Build completed. (150 files, 149 compiled, 0 warnings, 8.13s)
cljs.user=>
It works fine with the latest version of shadow-cljs(2.20.2).
I have faced the following error and currently I am not able to find a way fixing the problem.
Does anybody give me suggestions to avoid this error ?
Thanks