This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-27
Channels
- # announcements (8)
- # babashka (7)
- # beginners (24)
- # biff (5)
- # calva (17)
- # cider (1)
- # clj-kondo (4)
- # clojure (61)
- # clojure-europe (5)
- # clojure-norway (19)
- # clojurescript (17)
- # conjure (1)
- # core-typed (14)
- # cursive (9)
- # datomic (7)
- # events (2)
- # figwheel (2)
- # helix (1)
- # honeysql (4)
- # jobs (3)
- # lsp (3)
- # malli (2)
- # nrepl (13)
- # off-topic (9)
- # pathom (6)
- # pedestal (3)
- # polylith (3)
- # portal (7)
- # reagent (4)
- # reitit (2)
- # shadow-cljs (49)
- # tools-deps (8)
- # vim (3)
I’m getting this error when I add :deps {:aliases [:dev]}
to my shadow conf. Running clj -M:dev
has no error
Execution error (ClassCastException) at clojure.tools.cli/tokenize-args (cli.cljc:34).
class clojure.lang.ArraySeq cannot be cast to class java.lang.CharSequence (clojure.lang.ArraySeq is in unnamed module of loader 'app'; java.lang.CharSequence is in module java.base of loader 'bootstrap')
What do you expect to happen? Do you want to point shadow at a deps file?
@U0DJ4T5U1 yes, to get path and deps here is my deps.edn
{:paths ["src/clj" "src/cljc" "src/cljs" "resources"]
:deps
{buddy/buddy-auth {:mvn/version "3.0.323"}
buddy/buddy-core {:mvn/version "1.10.413"}
buddy/buddy-hashers {:mvn/version "1.8.158"}
buddy/buddy-sign {:mvn/version "3.4.333"}
ch.qos.logback/logback-classic {:mvn/version "1.2.10"}
cljs-ajax/cljs-ajax {:mvn/version "0.8.4"}
clojure.java-time/clojure.java-time {:mvn/version "0.3.3"}
com.cognitect/transit-clj {:mvn/version "1.0.329"}
com.cognitect/transit-cljs {:mvn/version "0.8.269"}
conman/conman {:mvn/version "0.9.3"}
cprop/cprop {:mvn/version "0.1.19"}
day8.re-frame/http-fx {:mvn/version "0.2.4"}
expound/expound {:mvn/version "0.9.0"}
funcool/struct {:mvn/version "1.4.0"}
haslett/haslett {:mvn/version "0.1.7"}
json-html/json-html {:mvn/version "0.4.7"}
luminus-http-kit/luminus-http-kit {:mvn/version "0.1.9"}
luminus-migrations/luminus-migrations {:mvn/version "0.7.1"}
luminus-transit/luminus-transit {:mvn/version "0.1.5"}
luminus/ring-ttl-session {:mvn/version "0.3.3"}
markdown-clj/markdown-clj {:mvn/version "1.10.8"}
metosin/muuntaja {:mvn/version "0.6.8"}
metosin/reitit {:mvn/version "0.5.15"}
metosin/ring-http-response {:mvn/version "0.9.3"}
mount/mount {:mvn/version "0.1.16"}
nrepl/nrepl {:mvn/version "0.9.0"}
org.babashka/sci {:mvn/version "0.3.3"}
org.clojure/clojure {:mvn/version "1.10.3"}
org.clojure/clojurescript {:mvn/version "1.11.4"}
org.clojure/core.async {:mvn/version "1.5.648"}
org.clojure/tools.cli {:mvn/version "1.0.206"}
org.clojure/tools.logging {:mvn/version "1.2.4"}
org.postgresql/postgresql {:mvn/version "42.3.2"}
org.webjars.npm/bulma {:mvn/version "0.9.3"}
org.webjars.npm/material-icons {:mvn/version "1.0.0"}
org.webjars/webjars-locator {:mvn/version "0.42"}
re-frame/re-frame {:mvn/version "1.2.0"}
reagent/reagent {:mvn/version "1.1.0"}
ring-webjars/ring-webjars {:mvn/version "0.2.0"}
ring/ring-core {:mvn/version "1.9.5"}
ring/ring-defaults {:mvn/version "0.3.3"}
selmer/selmer {:mvn/version "1.12.50"}
thheller/shadow-cljs {:mvn/version "2.17.8"}}
:aliases
{:dev
{:jvm-opts ["-Dconf=dev-config.edn"]
:extra-paths ["env/dev/clj" "env/dev/cljs" "env/dev/resources" "test/cljs"]
:extra-deps {binaryage/devtools {:mvn/version "1.0.5"}
cider/piggieback {:mvn/version "0.5.3"}
org.clojure/tools.namespace {:mvn/version "1.2.0"}
prone/prone {:mvn/version "2021-04-23"}
re-frisk-remote/re-frisk-remote {:mvn/version "1.5.2"}
ring/ring-devel {:mvn/version "1.9.5"}
ring/ring-mock {:mvn/version "0.4.0"}}
:main-opts ["-m" "user"]}
:test
{:jvm-opts ["-Dconf=test-config.edn"]
:extra-paths ["test"]
:extra-deps {pjstadig/humane-test-output {:mvn/version "0.11.0"}}}
;; Linter
:eastwood
{:main-opts ["-m" "eastwood.lint"
;; Any Eastwood options can be passed here as edn:
{}]
:extra-deps {jonase/eastwood {:mvn/version "1.2.3"}}}}}
not sure. this is a problem with the tools.deps setup and not related to shadow-cljs. maybe try updating tools.deps or so.
yes, was :main-opts
, removed and is working fine, but I cannot load the clojure user
namespace anymore. do you have any idea how to specify it into deps or shadow-dev?
what does load the clojure user namespace mean to you? it'll always be "loaded" when it is on the classpath
you can just run clj -M:dev
and run shadow-cljs in embedded mode from that https://shadow-cljs.github.io/docs/UsersGuide.html#embedded
or you create a separate alias to launch your backend server and run shadow-cljs separately (which I recommend)
I upgraded to the latest cljs and added a web worker over the weekend. Now when I open a release
build, I’m getting an error that it cannot connect to ws://<domain>:9630
. I’m tried deleting the build directory and re-releasing without running the watch command but I’m still getting ws/REPL/UI code. Is this a known issue? The only references I have to any shadow modules in my codebase are shadow.loader
to load static files, those calls have not changed
Full error:
websocket.cljs:12 Mixed Content: The page at 'https://<domain>/pixi' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://<domain>:9630/api/remote-relay?server-token=c17d72ac-00fb-482a-8eb5-3ac7c88e9fba'. This request has been blocked; this endpoint must be available over WSS.
a release build will never connect to :9630
? are you maybe loading an outdated file?
don't know anything about what you are building but the ws connection to :9630
is for the development websocket
the thing you start with (js/Worker. ...)
is webworker. that is fine and not related.
do you manually require any of the shadow.cljs.devtools
namespaces in your code somewhere? or in your build config?
its common that people don't notice they still load files from an old directory or something