This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-27
Channels
- # announcements (13)
- # asami (12)
- # babashka (65)
- # beginners (62)
- # calva (14)
- # cider (8)
- # clara (11)
- # clj-kondo (16)
- # clojure (86)
- # clojure-europe (12)
- # clojure-gamedev (4)
- # clojure-nl (2)
- # clojure-sg (4)
- # clojure-uk (5)
- # clojurescript (206)
- # clojureverse-ops (11)
- # community-development (7)
- # conjure (12)
- # core-async (2)
- # core-logic (13)
- # cursive (49)
- # datalevin (1)
- # datomic (30)
- # deps-new (3)
- # duct (8)
- # events (5)
- # fulcro (10)
- # helix (5)
- # jobs (1)
- # klipse (5)
- # lsp (178)
- # luminus (1)
- # malli (8)
- # meander (3)
- # membrane (13)
- # missionary (1)
- # nrepl (5)
- # other-languages (4)
- # pedestal (4)
- # reitit (3)
- # releases (1)
- # reveal (27)
- # shadow-cljs (89)
- # tools-build (6)
- # tools-deps (11)
- # vim (2)
- # xtdb (64)
@diego.vid.eco 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? https://helpdeskgeek.com/how-to/how-to-fix-filename-is-too-long-issue-in-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 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?
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) ?
if you want something that is completely self contained you can post process the output with something like https://github.com/vercel/ncc
if you make it a npm package you just include a package.json and that'll take care of installing the dependencies for you
its pretty much the same in clojure with using a jar vs uberjar, if that means anything to you
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 ...
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?
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
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 (main.java:40). 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?Yeap, no errors in intellij
{:deps {some/thing {:mvn/version "1.2.3
thheller/shadow-cljs {:mvn/version "4.5.6"}}}
{:aliases
{
;; start a modern nREPL server on port 4000:
:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}}
:main-opts ["-m" "nrepl.cmdline"
"--bind" "0.0.0.0"
"--port" "4000"]
:jvm-opts ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5010"]}
: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
{pack/pack.alpha
{:git/url ""
:sha "511c32d4238afb860ad0b16c4827322d80c7d615"
:exclusions [org.slf4j/slf4j-nop]}}
:main-opts
["-m"]}
}
:jvm-opts [
;; added to prevent exceptions with no stacktraces, see:
;;
"-XX:-OmitStackTraceInFastThrow"
]
: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
com.datomic/datomic-free]}
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 ` `
com.google.api-client/google-api-client {:mvn/version "1.32.2"}
sv/gcloud.client {:mvn/version "0.1.4"}
com.google.guava/guava {:mvn/version "27.0.1-jre"}
com.google.cloud/google-cloud-storage {: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
org.slf4j/slf4j-nop]}
;; 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"}
com.google.cloud.sql/mysql-socket-factory {: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]}
}
}
Previously it was working and in the PR there is no changes that breaks formatting/typos etc
what do you mean?
via clojure
don't know what else to tell you. look at the command you run and see if that properly activates the :cljs
alias
I get it while running yarn release
yarn install --frozen-lockfile && yarn gulp && yarn shadow-cljs release client --source-maps && yarn build-tailwind
so I guess this is what you asked for yarn shadow-cljs release client --source-maps
:deps {:aliases [:cljs]}
sorry for the delay
dev@build-0:~/app$ clj -A:cljs -M -m shadow.cljs.devtools.cli clj-repl
Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate shadow/cljs/devtools/cli__init.class, shadow/cljs/devtools/cli.clj or shadow/cljs/devtools/cli.cljc on classpath.
@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
Ohhhh, duh, I’m so sorry, I assumed “elsewhere” meant outside the context of the browser
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 aboveSorry for my misunderstanding
btw I’ve also tried the approach https://clojurians.slack.com/archives/C6N245JGG/p1635137311018500?thread_ts=1634815794.002200&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)
maybe setting :js-options {:entry-keys ["module" "browser" "main"]}
in your build config can fix it
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
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?
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
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
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 https://github.com/jacekschae/shadow-cljs-tailwindcss see the package.json using npm-run-all commands
oh yeah, I think I saw a GitHub issue mentioning this! thanks!