This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-19
Channels
- # announcements (24)
- # asami (25)
- # babashka (17)
- # beginners (99)
- # bitcoin (1)
- # calva (2)
- # cider (6)
- # cljs-dev (4)
- # clojure (88)
- # clojure-australia (3)
- # clojure-europe (23)
- # clojure-france (6)
- # clojure-nl (5)
- # clojure-uk (31)
- # clojured (1)
- # clojurescript (6)
- # clojureverse-ops (1)
- # datomic (28)
- # depstar (18)
- # emacs (11)
- # events (1)
- # fulcro (21)
- # graalvm (4)
- # graphql (7)
- # heroku (1)
- # jackdaw (18)
- # joker (3)
- # kaocha (1)
- # lsp (1)
- # malli (13)
- # meander (4)
- # off-topic (12)
- # pathom (14)
- # pedestal (2)
- # podcasts-discuss (1)
- # re-frame (37)
- # reagent (17)
- # reitit (9)
- # shadow-cljs (44)
- # xtdb (17)
I have a problem with starting shadow-cljs server on my Jenkins Alpine Linux machine using shadow-cljs start
After long time I’m getting
shadow-cljs - server starting "a lot of dots and" `Cannot contact jenkins_cluster: hudson.remoting.RequestAbortedException: java.nio.channels.ClosedChannelException` error.
It could be some policy of our Jenkins which doesn’t allow that but I cannot find any information which I can pass to our DevOps to investigate that. Is the some way to get more details what is going on under the hood of this command? Or maybe there is a way to enable some logs (`-v` and --debug
shows nothing)?The same is going one when I try to run shadow-cljs start
on Docker image https://github.com/theasp/docker-clojurescript-nodejs locally. You can reproduce it from your project directory using
docker run --rm -v ${PWD}:/home/my-project -w="/home/my-project" theasp/clojurescript-nodejs:latest npx shadow-cljs start
@thheller I would like to use https://github.com/lambdaisland/kaocha-cljs2 to run tests and I need somehow to serve the compiled tests with shadow-cljs, so I have decided to use shadow-cljs
server for that. I am not sure if it is the best choice. I would appreciate a better advice on that if you have
you could maybe run the tests via https://shadow-cljs.github.io/docs/UsersGuide.html#clj-run
Actually what I need is to serve the complied directory with lambdaisland.chui.remote
to be preloaded. And shadow-cljs server
looks ideal. I could try to look for another way to achieve the same. But do you have any idea why it doesn’t work on Docker? Is it expected or can I log the issue in GitHub for that?
I don't have a clue why it wouldn't work. maybe the logfiles created in the .shadow-cljs/
dir provide some clues? I'm not capable of debugging docker issues. if server
works fine I'd assume start
to work as well since the only thing it does is detach to process into the background.
let me actually check if shadow-cljs server
works inside Docker. I haven’t checked it separately
@thheller when I am using shadow-cljs server
with local docker I get a project specific error (out of scope for my question). But it seems shadow-cljs start
hanging when errors occur, is it possible?
shadow-cljs server
failed (actually process just ends) during fetching lein private dependencies because of luck of permissions. During shadow-cljs start
it just shows dots
yeah with start
all logging goes into the log files in .shadow-cljs/server.stdout.log
or server.stderr.log
@thheller thanks for you advices, they helped me to find root cause of the problem. I will create an issue in GitHub for use case that start
is hanging when error occurs during start up if you don’t mind.
My root issue on Jenkins was that jks ssl certificate which we use for local environment was not committed and I still not sure is it a good idea to commit it. Is it possible somehow to force shadow-cljs to ignore ssl certificate if it is not found instead of throwing exception?
I don’t need that to work. I need SSL for local server but not when I run tests
hmm yeah I guess there should be an option to disable that but for CI you could just write a simple script that just deletes the :ssl
config from shadow-cljs.edn
before actually starting it
Option will be better, but I try to write something in meanwhile
(require '[ :as io])
(require '[clojure.edn :as edn])
(let [file (io/file "shadow-cljs.edn")]
(-> (slurp file)
(edn/read-string)
(dissoc :ssl)
(as-> config
(spit file (pr-str config)))))
if you have clojure
installed on the CI system you can just put that into a script file and run it with that
thanks a lot. I’ll try
While setting up :js-provider :external
, I have found that it only works with ["react" as react]
style requires. Meaning that both the string-style and the alias is required in order for the corresponding js require to be generated. Is this a known issue/by design? This could be very tricky for others to figure out. The string syntax is fine, when documented, but the required alias is more of a pitfall.
Hi. I am building with :target :node-library
and I would like to use the fetch
api. But (js/fetch ...)
fails with fetch is not definded
and requiring ["node-fetch"]
fails with symbol module$shadow_js_shim_module$node_fetch already provided by [:shadow.build.js-support/require "node.fetch"], conflict with [:shadow.build.js-support/require "node-fetch"]
. Any suggestions how to access the fetch
function? Thank you.
looks like you have a node.fetch
and a node-fetch
? they clash, stick to one I guess?
What do you mean by "you have"? In my own namespaces I don't use any of these. But I would like to and I can not fugure out how to require it.
I am on the latest version. Requiring [node.fetch :as nf]
errors in the compiler with he required namespace "node.fetch" is not available
. Requiring ["node.fetch" :as nf]
passes the compiler, but errors at runtime when loading with Error: Cannot find module 'node.fetch'
. 😞
I'm entirely confused. WHERE does the "node.fetch"
come from? if you ONLY have "node-fetch"
that should be totally fine but having that as well as "node.fetch"
will not work
I have some dependencies. Like firebase-admin
and firebase-functions
. Perhaps it comes from there.
not if you are using :node-library
, then shadow-cljs will not process any npm dependencies at all. some CLJS code must be requiring that
also verify which shadow-cljs version you are using. I thought I fixed this particular issue.
the problem is that node-fetch
AND node.fetch
both munge into the module$shadow_js_shim_module$node_fetch
pseudo-namespace and they need to be unique