This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-11
Channels
- # announcements (3)
- # babashka (62)
- # beginners (58)
- # calva (40)
- # cider (3)
- # clj-kondo (75)
- # cljdoc (14)
- # clojars (8)
- # clojure (110)
- # clojure-australia (6)
- # clojure-europe (38)
- # clojure-hungary (1)
- # clojure-india (4)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-spec (4)
- # clojure-uk (3)
- # clojurescript (45)
- # conjure (4)
- # cursive (35)
- # data-science (1)
- # datomic (11)
- # events (2)
- # exercism (4)
- # figwheel-main (4)
- # fulcro (103)
- # graphql (16)
- # helix (1)
- # holy-lambda (16)
- # honeysql (1)
- # introduce-yourself (3)
- # jobs (1)
- # keyboards (2)
- # lsp (4)
- # malli (11)
- # membrane-term (3)
- # mount (2)
- # nextjournal (2)
- # off-topic (53)
- # pathom (30)
- # pedestal (2)
- # portal (22)
- # rdf (1)
- # re-frame (7)
- # reagent (3)
- # reitit (5)
- # remote-jobs (6)
- # shadow-cljs (20)
- # sql (8)
- # tools-build (10)
- # vim (4)
- # xtdb (12)
@sritchie09 that is a stacktrace that definitely NOT using the latest shadow-cljs version. remember when using :lein true
in your shadow-cljs.edn
that your project.clj
determines the shadow-cljs version, not the npm package.
Doh… okay, thank you. I was assuming in retrospect that the command was modifying the dep, as I sometimes see, but it is clearly not. Thanks for the help!
I’m following this tutorial:
https://www.youtube.com/watch?v=yVb8PS6a4Mk&t=79s
In the video he starts shadow-cljs using calva.
The command that gets run is:
npx shadow-cljs -d cider/cider-nrepl:0.26.0 watch :app
This is the same for me.
In the video, JS dependencies are installed.
For me, they’re not installed.
Did he skip a step? I’m looking through the shadow-cljs docs and I can’t see a command that is meant to install dependencies.
I could install them myself but I guess I’m just curious why it didn’t work the same way for me. 🙂
npx shadow-cljs -d cider/cider-nrepl:0.26.0 watch :app
npx: installed 97 in 6.588s
shadow-cljs - config: /Users/nathankramer/Projects/nathanKramer/reframe-example/shadow-cljs.edn
shadow-cljs - HTTP server available at
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.16.2 running at
shadow-cljs - nREPL server started on port 8777
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build failure:
The required namespace "react" is not available, it was required by "day8/re_frame_10x/inlined_deps/reagent/v1v0v0/reagent/core.cljs".
In the meantime, I manually installed the dependencies, and the boots nicely, so no biggie
Yep, thanks.
Do you happen to know if that was supposed to happen automatically? Is it usually managed by shadow-cljs
? 🙂
Interesting, wonder why it didn’t work for me.
I do have a package.json
, and it has react etc in it. Curious!
if react is already in package.json then shadow-cljs will not trigger a install again
Anyone try using shadow-cljs with nodegui? Seems like a descent more performant alternative to electron. https://react.nodegui.org/
Never tried it. I’ve been playing around with Tauri though. https://github.com/tauri-apps/tauri
I am using tools.build to create an uberjar for the backend portion of a web app. I would like to use shadow.cljs.devtools.api/release
from this build script as well. It does work fine for a browser build, the issue is when compiling the cljs tests (`:node-test` target) - because tools.build places the entire project directory on the classpath the test discovery finds a file in the test
directory and then expects the namespace to start with test/
:
:cause "Resource does not have expected namespace",
:data
{:tag :shadow.build.resolve/unexpected-ns,
:resource
"test/my-app/components/events_test.cljs",
:expected-ns
test.my-app.components.events-test,
:actual-ns my-app.components.events-test}}}
I think the browser build works because the entry namespace is provided and discovered on the classpath in the correct spot. So I'm wondering if there are any creative solutions to this problem. The context is running a build in continuous integration where starting two JVM processes slows things down quite a bit.