This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-16
Channels
- # announcements (1)
- # aws (6)
- # babashka (17)
- # beginners (30)
- # calva (12)
- # cider (25)
- # circleci (2)
- # clojure (42)
- # clojure-australia (8)
- # clojure-czech (1)
- # clojure-europe (30)
- # clojure-france (52)
- # clojure-italy (2)
- # clojure-nl (16)
- # clojure-serbia (3)
- # clojure-uk (10)
- # clojurescript (40)
- # core-async (5)
- # cursive (24)
- # datalog (7)
- # datomic (8)
- # emacs (4)
- # events (1)
- # figwheel-main (3)
- # fulcro (2)
- # helix (5)
- # heroku (1)
- # kaocha (6)
- # leiningen (3)
- # malli (11)
- # music (5)
- # off-topic (20)
- # practicalli (1)
- # re-frame (4)
- # react (8)
- # reitit (14)
- # rewrite-clj (5)
- # rum (2)
- # schema (2)
- # shadow-cljs (23)
- # vrac (28)
- # wasm (4)
- # xtdb (12)
- # yada (5)
How to debug this error? I create a brand new project but get IllegalArgumentException: no conversion to symbol Clojure lein new re-frame duck
Retrieving re-frame/lein-template/2.1.2/lein-template-2.1.2.pom from clojars
Retrieving re-frame/lein-template/2.1.2/lein-template-2.1.2.jar from clojars
Generating re-frame project.
➜ Clojure cd duck
➜ duck shadow-cljs run
shadow-cljs - config: /home/hovgaard/Clojure/duck/shadow-cljs.edn
shadow-cljs - updating dependencies
Retrieving thheller/shadow-cljs/2.12.5/shadow-cljs-2.12.5-aot.jar from https://repo.clojars.org/
shadow-cljs - dependencies updated
running: npm install --save --save-exact [email protected] [email protected]
added 101 packages, and audited 102 packages in 2s
3 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
IllegalArgumentException: no conversion to symbol
clojure.core/symbol (core.clj:596)
clojure.core/symbol (core.clj:589)
shadow.cljs.devtools.cli-actual/do-clj-run (cli_actual.clj:70)
shadow.cljs.devtools.cli-actual/do-clj-run (cli_actual.clj:65)
shadow.cljs.devtools.cli-actual/blocking-action (cli_actual.clj:126)
shadow.cljs.devtools.cli-actual/blocking-action (cli_actual.clj:116)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:177)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:132)
clojure.core/apply (core.clj:669)
clojure.core/apply (core.clj:660)
shadow.cljs.devtools.cli-actual/-main (cli_actual.clj:219)
shadow.cljs.devtools.cli-actual/-main (cli_actual.clj:217)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core/apply (core.clj:665)
clojure.core/apply (core.clj:660)
shadow.cljs.devtools.cli/-main (cli.clj:75)
shadow.cljs.devtools.cli/-main (cli.clj:67)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core/apply (core.clj:665)
clojure.main/main-opt (main.clj:514)
clojure.main/main-opt (main.clj:510)
clojure.main/main (main.clj:664)
clojure.main/main (main.clj:616)
clojure.lang.Var.applyTo (Var.java:705)
clojure.main.main (main.java:40)
duck clojure --version
Clojure CLI version 1.10.3.822
duck java --version
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment 18.9 (build 11.0.10+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.10+9, mixed mode, sharing)
@alan.hovgaard why do you call shadow-cljs run
? that expects more arguments? did you mean shadow-cljs server
, shadow-cljs watch app
or so?
Getting this when trying to include some modules of codemirror
Closure compilation failed with 1 errors
--- node_modules/lezer-tree/dist/tree.cjs:385
ES6 transpilation of 'declaration with multiple destructuring children not in statement block' is not yet implemented.
hey folks, i'm using shadow-cljs to create a Github Action that uses cljs (targeting nodejs). I'm getting what looks like extern related errors when the built JS is run by Github. I do see some inference warnings in the shadow-cljs build output
here's the error I see when the github action is run: "f.git.zc is not a function"
here's the code that's failing (println (<p! (.. octokit -git (updateRef update-args))))
- octokit
is pulled from a github npm library.
so this def seems externs related but I'm wondering how i'd resolve this in a nodejs context? do I really need to add externs for each function i want to use from github's library?
interestingly, i have another line prior to the above which seems to run successfully without any extern issues: ref-resp (js->clj (<p! (.. octokit -git (getRef ref-args))))
any idea what might be happening here?
the problem is that core.async loses typehints so even if you type hint the externs inference doesn't work correctly
so if i wrap those lines in a function defined outside of the go block, i should be good?
just out of curiosity do you recommend folks use a lib like cljs-oops in order to not worry about externs?
normally externs inference is a much better way to go, it just suffers a little in core.async
ok i actually had one last question (though this might be more on the github actions end) -
if i don't commit the node_modules/
directory along with the JS script that shadow-cljs outputs, then I get this error when the script is run on github: Error: Cannot find module '@actions/core'
while committing node_modules/
alongside the script seems to work, i always thought doing a release with shadow-cljs would automatically use the closure compiler to inject the relevant JS from those node modules into the outputted script. i feel like there might be a piece of this i'm not following
by default :node-script
(which I assume you are using?) does not bundle the dependencies since node will provide them via node_modules
you can post-process the file with https://github.com/vercel/ncc which would make it standalone