Fork me on GitHub
thheller07:10:36 I can't reproduce that problem? which OS is this? I'm on windows 10 and its working fine? supposedly you can increase the max filename length on windows?


I am on Linux Mint, I guess it may be possible


Didn't try it as I wouldn't want to risk having problems when building somewhere else. In the end I opted for another library.


(I have not done this but maybe fixes your issue?)


I have a question about the output of the :node-script option. I used it successfully, but in the mode that I had built things, the node script that was output still had some dependencies back into the build directory. Is that expected, or a characteristic somehow of the build that I specified? Do you know offhand?


(I mean like SHADOW-IMPORT-PATH sorts of things)


Ok maybe this is just the difference between doing a compile vs release in this case.


@pmooser yes, compile is only meant to run in the place where it is created. release you can move around. it'll still require access to the npm modules you used though


Ah, interesting. So I guess that means ... you can't really move the result between machines unless your npms are installed globally (and presumably the versions match etc) ?


no not at all


just need to consider how you move things arround


if you want something that is completely self contained you can post process the output with something like


if you make it a npm package you just include a package.json and that'll take care of installing the dependencies for you


and no never install any npm packages globally


its pretty much the same in clojure with using a jar vs uberjar, if that means anything to you


jar won't run without dependencies, uberjar will


uberjar = post processed with ncc


Hmm, thanks very much for that link. I don't understand quite enough about npm to understand (yet) how to do it myself but that project looks like it might be the perfect thing. What I was experimenting with was using the node-script capability to be able to make some scripts that can do some batch processing on data that our app uses, but without involvement of our normal client/server ...


It's really a very nice capability!


Yeah, I understand jar vs uberjar.


One more (stupid) question - is it feasible to just install the npms myself in the directory where I run the script, as opposed to using a packaging utility like the one you linked?


Although the thing you linked looks very easy to use.


create a directory. put a package.json into it. put the :node-script output into it. copy that directory to wherever, run npm install then you can run your script just fine


just declare the runtime dependencies of your script in the package.json and npm install will install them


Ok - thanks thheller!

Mateusz Mazurczak13:10:35

Hi! I get an error after I updated libraries (it was a long time since they were updated)

Execution error (FileNotFoundException) at clojure.main/main ( Could not locate shadow/cljs/devtools/cli__init.class, shadow/cljs/devtools/cli.clj or shadow/cljs/devtools/cli.cljc on classpath.                                                           
I have thheller/shadow-cljs in my deps.edn. The version in deps.edn and in yarn.lock is the same.
thheller/shadow-cljs {:mvn/version "2.15.12"}
Any ideas?


is deps.edn formatted correctly?


sometimes things slip into other maps and such

Mateusz Mazurczak13:10:11

Yeap, no errors in intellij


{:deps {some/thing {:mvn/version "1.2.3
            thheller/shadow-cljs {:mvn/version "4.5.6"}}}


that would give no error but still be incorrect

Mateusz Mazurczak13:10:00

  ;; start a modern nREPL server on port 4000:
  :nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}}
          :main-opts ["-m" "nrepl.cmdline"
                      "--bind" ""
                      "--port" "4000"]
          :jvm-opts ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address="]}

  :cljs {:extra-deps {thheller/shadow-cljs {:mvn/version "2.15.12"}
                      com.cognitect/transit-cljs {:mvn/version "0.8.256"}
                      reagent/reagent {:mvn/version "1.1.0"
                                       :exclusions [cljsjs/react cljsjs/react-dom]}
                      secretary/secretary {:mvn/version "1.2.3"}
                      hiccups/hiccups {:mvn/version "0.3.0"
                                       :exclusions [cljsjs/react cljsjs/react-dom]}
                      cljs-http/cljs-http {:mvn/version "0.1.45"}
                      bidi/bidi {:mvn/version "2.1.6"}
                      noencore/noencore {:mvn/version "0.3.4"}
                      medley/medley {:mvn/version "1.2.0"}
                      reagent-utils/reagent-utils {:mvn/version "0.3.4"
                                                   :exclusions [cljsjs/react cljsjs/react-dom]}
                      com.andrewmcveigh/cljs-time {:mvn/version "0.5.2"}
                      org.clojure/core.match {:mvn/version "0.3.0-alpha5"}
                      garden/garden {:mvn/version "1.3.6"}
                      alandipert/storage-atom {:mvn/version "2.0.1"}
                      frankiesardo/linked {:mvn/version "1.3.0"}
                      markdown-clj/markdown-clj {:mvn/version "1.0.7"}

                      ;; [Devtools]()
                      ;; adds custom formatters support for ClojureScript to
                      ;; Chrome, so that ClojureScript data can be
                      ;; comfortably inspected in the Chrome Dev Tools
                      ;; Console. Shadow-CLJS automatically activates
                      ;; cljs-devtools for every dev build, when it is on
                      ;; the classpath, see:
                      binaryage/devtools {:mvn/version "0.9.10"}

                      cider/cider-nrepl {:mvn/version "0.26.0"}
         :extra-paths ["src/cljs"]}

  :pack {:extra-deps
          {:git/url ""
           :sha "511c32d4238afb860ad0b16c4827322d80c7d615"
           :exclusions [org.slf4j/slf4j-nop]}}

 :jvm-opts [
            ;; added to prevent exceptions with no stacktraces, see:

 :paths ["src/clj" "src/cljc" "src/cljs" "resources" "classes"]

 :mvn/repos {"" {:url ""}
             "central" {:url ""}
             "clojars" {:url ""}}

 :deps {org.clojure/clojure {:mvn/version "1.10.3"}
        org.clojure/core.cache {:mvn/version "1.0.217"}
        org.clojure/core.memoize {:mvn/version "1.0.250"}
        org.clojure/core.async {:mvn/version "1.3.622"}
        org.clojure/core.match {:mvn/version "1.0.0"}
        com.cognitect/transit-clj {:mvn/version "1.0.324"}
        com.cognitect/anomalies {:mvn/version "0.1.12"}

        nrepl/nrepl {:mvn/version "0.8.3"}

        expound/expound {:mvn/version "0.8.10"}
        ring/ring-core {:mvn/version "1.9.4"}
        ring/ring-servlet {:mvn/version "1.9.4"}
        ring/ring-ssl {:mvn/version "0.3.0"}
        javax.servlet/servlet-api {:mvn/version "2.5"}
        clj-time/clj-time {:mvn/version "0.15.2"}
        org.clojure/tools.namespace {:mvn/version "1.1.0"}
        medley/medley {:mvn/version "1.3.0"}
        io.sentry/sentry-clj {:mvn/version "5.2.158"}
        ring-middleware-format/ring-middleware-format {:mvn/version "0.7.4"}
        ring-partial-content/ring-partial-content {:mvn/version "2.0.1"}
        ring-cors/ring-cors {:mvn/version "0.1.13"}
        bk/ring-gzip {:mvn/version "0.3.0"}
        cheshire/cheshire {:mvn/version "5.10.1"}
        org.shredzone.acme4j/acme4j-client {:mvn/version "2.12"}
        org.shredzone.acme4j/acme4j-utils {:mvn/version "2.12"}
        noencore/noencore {:mvn/version "0.3.6"}
        environ/environ {:mvn/version "1.2.0"}
        sv/blob-storage {:mvn/version "0.1.0"}
        sv.blob-storage/file-blob-storage {:mvn/version "0.1.0"}
        sv.blob-storage/gcloud-storage {:mvn/version "0.1.2"}
        com.draines/postal {:mvn/version "2.0.4"}
        hiccup/hiccup {:mvn/version "1.0.5"}
        buddy/buddy-auth {:mvn/version "3.0.1"}
        me.raynes/fs {:mvn/version "1.4.6"}
        digest/digest {:mvn/version "1.4.10"}
        markdown-clj/markdown-clj {:mvn/version "1.10.6"}
        clj-http/clj-http {:mvn/version "3.12.3"}

        sv/system.core {:mvn/version "0.1.1"}
        sv/system.datomic {:mvn/version "0.1.0"
                           :exclusions [org.slf4j/log4j-over-slf4j
        sv/system.main {:mvn/version "0.1.0"}
        sv/system.httpkit {:mvn/version "0.1.0"}

        ;; it is important to use a recent version of
        ;; http-kit since the older version 2.1.18 caused a
        ;; downtime of the leader server due to this issue:
        http-kit/http-kit {:mvn/version "2.5.3"}

        sv/system.ring {:mvn/version "0.1.0"}

        ;; logging:
        com.taoensso/timbre {:mvn/version "5.1.2"}
        sv/timbre.gcloud.logging {:mvn/version "0.1.4"}
        com.fzakaria/slf4j-timbre {:mvn/version "0.3.21"}
        org.slf4j/log4j-over-slf4j {:mvn/version "1.7.32"}
        org.slf4j/jul-to-slf4j {:mvn/version "1.7.32"}
        org.slf4j/jcl-over-slf4j {:mvn/version "1.7.32"}

        ;; using a newer version here, since it has a
        ;; better `DefaultCredentialProvider` that also
        ;; resolve the application-default-credentials inside
        ;; a docker container via Google Cloud's metadata
        ;; service `` {:mvn/version "1.32.2"}

        sv/gcloud.client {:mvn/version "0.1.4"} {:mvn/version "27.0.1-jre"} {:mvn/version "2.1.9"}
        etaoin/etaoin {:mvn/version "0.4.6"}
        clj-chrome-devtools/clj-chrome-devtools {:mvn/version "20200423"}
        com.datomic/datomic-pro {:mvn/version "0.9.5561"
                                 :exclusions [org.slf4j/log4j-over-slf4j

        ;; Datomic production storage backend:
        mysql/mysql-connector-java {:mvn/version "8.0.27"}
        ;; for the development environment:
        org.postgresql/postgresql {:mvn/version "42.3.0"} {:mvn/version "1.3.4"}

        ;; For  to verify webhook requests:
        com.xk72/paddle-webhook-verifier {:mvn/version "1.0"}

        io.grpc/grpc-core {:mvn/version "1.41.0"}
        org.clojure/data.csv {:mvn/version "1.0.0"}
        com.datomic/client-pro {:mvn/version "1.0.72"}
        com.datomic/client-cloud {:mvn/version "1.0.117"}
        danlentz/clj-uuid {:mvn/version "0.1.9"}
        fipp/fipp {:mvn/version "0.6.24"}
        borkdude/sci {:mvn/version "0.2.7"}
        diehard/diehard {:mvn/version "0.10.4"}

        sv/basis {:local/root "basis"}

        sv/message-emit {:git/url ""
                         :sha "e2ad34537505cd7c9e015d88fc4db1da8a42a06f"
                         :deps/root "message-emit"}

        sv/message-logging {:git/url ""
                            :sha "e2ad34537505cd7c9e015d88fc4db1da8a42a06f"
                            :deps/root "message-logging"}

        sv/memcached-auto-discovery {:git/url ""
                                     :sha "e2ad34537505cd7c9e015d88fc4db1da8a42a06f"
                                     :deps/root "memcached-auto-discovery"}

        sv/registry {:git/url ""
                     :sha "e2ad34537505cd7c9e015d88fc4db1da8a42a06f"
                     :deps/root "registry"}
        sv/peer-sci {:git/url ""
                     :sha "590932368d57d09fb475b946b5214996a9abb23f"
                     :exclusions [sv/slf4j-gke-logging]}

Mateusz Mazurczak13:10:08

Previously it was working and in the PR there is no changes that breaks formatting/typos etc


did you activate the alias?

Mateusz Mazurczak13:10:35

what do you mean?


how did you launch shadow-cljs?


what does that mean?


the error you get means that shadow-cljs is NOT on the classpath


so whatever you launched did NOT add the :cljs :extra-deps


don't know what else to tell you. look at the command you run and see if that properly activates the :cljs alias


when/how do you get the error? everything looks correct so far

Mateusz Mazurczak13:10:53

I get it while running yarn release


what does that run?

Mateusz Mazurczak14:10:38

yarn install --frozen-lockfile && yarn gulp && yarn shadow-cljs release client --source-maps && yarn build-tailwind

Mateusz Mazurczak14:10:09

so I guess this is what you asked for yarn shadow-cljs release client --source-maps


yes. so in shadow-cljs.edn do you have :deps {:aliases [:cljs]}?

Mateusz Mazurczak14:10:11

:deps {:aliases [:cljs]}


so what is the output of yarn shadow-cljs release client


or just run yarn shadow-cljs clj-repl

Mateusz Mazurczak14:10:11

sorry for the delay


and clj -A:cljs -M -m shadow.cljs.devtools.cli clj-repl?

Mateusz Mazurczak14:10:32

[email protected]:~/app$ clj -A:cljs -M -m shadow.cljs.devtools.cli clj-repl
Execution error (FileNotFoundException) at clojure.main/main (
Could not locate shadow/cljs/devtools/cli__init.class, shadow/cljs/devtools/cli.clj or shadow/cljs/devtools/cli.cljc on classpath.

Karol Wójcik14:10:09

@U0281QDFE1X Stepped upon the same. Remove .cpcache & try clj -Sforce This might happen if you remove $HOME/.m2


I got back around to looking into the Firebase upgrade and we’re still seeing the “could not load” error when using the compat modules

shadow-cljs - failed to load module$node_modules$firebase$compat$auth$dist$index_esm
There is a file node_modules/firebase/compat/auth/dist/index.esm.js and we’re not seeing any errors pointing in that direction in the server logs.


@martinklepsch again: this is NOT the error. this is a warning of the file that failed to load. the error is below or above depending on the shadow-cljs version you use


so tell me the error and I can maybe help you, just this warning is not enough


Ohhhh, duh, I’m so sorry, I assumed “elsewhere” meant outside the context of the browser


no elsewhere in the console


TypeError: (0 , _app._registerComponent) is not a function
    at eval (index-f41a0691.js:11897)
    at Object.shadow$provide.module$node_modules$$firebase$auth$dist$esm2017$index_f41a0691 (index-f41a0691.js:12019)
    at shadow.js.jsRequire (js.js:66)
    at Object.shadow$provide.module$node_modules$$firebase$auth$dist$esm2017$internal (internal.js:556)
    at shadow.js.jsRequire (js.js:66)
    at Object.shadow$provide.module$node_modules$$firebase$auth_compat$dist$index_esm2017 (index.esm2017.js:6)
    at shadow.js.jsRequire (js.js:66)
    at Object.shadow$provide.module$node_modules$firebase$compat$auth$dist$index_esm (index.esm.js:4)
    at Object.shadow.js.jsRequire (js.js:66)
    at Object.shadow.js.require (js.js:113)
This is the error that follows the warning above


Sorry for my misunderstanding


hmm yeah this appears to be a bug in the closure compiler


but we can't currently upgrade without a new cljs release


btw I’ve also tried the approach;cid=C6N245JGG (using :babel-preset-config {:targets {"chrome" "80"}})


that doesn't matter. typescript started rewriting some code to use the (0, whatever) trick


(but doesn’t seem to affect this)


but closure doesn't like that and rewrites it in a weird broken way


maybe setting :js-options {:entry-keys ["module" "browser" "main"]} in your build config can fix it


but that requires the package to actually publish non rewritten esm code


maybe it does. not sure


Should "main" correspond to a module/entrypoint in our build or is this to be used as-is?


as is. it only configures which key in package.json shadow-cljs uses when using npm packages


has nothing to do with your own code

👍 1

Ok. then it appears to cause the same error


I know there’s a CLJS release upcoming with a Closure upgrade, could it be worth to give that a try?


not that simple unfortunately


We’re not urgently looking for a solution but thought that maybe it’s nice to give feedback there


Ok, then we’ll just wait a bit 🙂


becuase of many breaking changes in the closure compiler we need to upgrade GCC, CLJS and shadow-cljs at the same time


I'm honestly beginning to regret using the closure compiler so much. it is getting tedious keeping up with their breakage


so I might swap that out for another option at some point


That sounds like a herculean effort to me but you probably have a much clearer picture of what that would look like 🙂


I’ll keep an eye on releases then, thanks for helping me understand what’s going wrong here 🙇


I hope the issue is actually fixed in the newer closure compiler. currently hard to try but they fixed a bunch of problems related to the new TS and indirect calls

👍 1
Felipe Cortez16:10:00

what's the proper way to call a CSS watcher process when starting the shadow server? build hooks kind of work but don't detect changes to CSS files. more generally, what's the best of way of launching an "observer" process along shadow?


I recommend a setup like this see the package.json using npm-run-all commands

Felipe Cortez16:10:01

oh yeah, I think I saw a GitHub issue mentioning this! thanks!