Using dependencies from shadow-cljs.edn in embedded mode
#1178
-
|
I am trying to use shadow in embedded mode: https://shadow-cljs.github.io/docs/UsersGuide.html#embedded It successfully can start the server, but on compilation it seems that it expects my dependencies to be listed in clj -M:repls
WARNING: Specified aliases are undeclared and are not being used: [:repls]
Clojure 1.11.1
user=> (require '[shadow.cljs.devtools.server :as server])
nil
user=> user=> (server/start!)
Apr 13, 2024 7:15:26 AM io.undertow.Undertow start
...
shadow-cljs - server version: 2.28.3 running at http://localhost:9630
shadow-cljs - nREPL server started on port 50130
:shadow.cljs.devtools.server/started
user=> (require '[shadow.cljs.devtools.api :as shadow])
nil
user=> (shadow/compile :frontend)
[:frontend] Compiling ...
The required namespace "reagent.core" is not available, it was required by "sfm/browser/app.cljs".
:errorAdding Is there any way to specify to get the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
shadow-cljs in embedded mode runs in the JVM it is embedded in and uses its classpath. It therefore never even checks where your dependencies are defined, since it cannot add anything reliably after the JVM is started. So, yes the intention is to have all your dependencies in |
Beta Was this translation helpful? Give feedback.
shadow-cljs in embedded mode runs in the JVM it is embedded in and uses its classpath. It therefore never even checks where your dependencies are defined, since it cannot add anything reliably after the JVM is started.
So, yes the intention is to have all your dependencies in
deps.ednif thats how you start your JVM. And no, there is no way to define and use them fromshadow-cljs.ednif used in embedded mode. I generally recommend putting them in a:cljsor so alias, to have some sort of separation but that is not super important.