This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-24
Channels
- # aleph (1)
- # beginners (43)
- # calva (22)
- # cider (51)
- # clerk (1)
- # clj-kondo (20)
- # clojure (29)
- # clojure-denmark (1)
- # clojure-europe (73)
- # clojure-finland (28)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-spec (7)
- # clojure-uk (4)
- # clojurescript (12)
- # data-science (2)
- # datomic (51)
- # events (1)
- # fulcro (20)
- # hyperfiddle (28)
- # integrant (6)
- # malli (20)
- # matrix (2)
- # music (1)
- # off-topic (66)
- # reitit (17)
- # releases (5)
- # ring (1)
- # shadow-cljs (31)
- # xtdb (6)
hey guys, im running the example from https://shadow-cljs.github.io/docs/UsersGuide.html#target-node-test and receive a npe error:
yarn shadow-cljs compile test
yarn run v1.23.0-20220130.1630
$ /h/node_modules/.bin/shadow-cljs compile test
shadow-cljs - config: /h/shadow-cljs.edn
shadow-cljs - connected to server
[:test] Compiling ...
NullPointerException:
shadow.build.node/configure (node.clj:59)
shadow.build.node/configure (node.clj:45)
shadow.build.targets.node-script/configure (node_script.clj:37)
shadow.build.targets.node-script/configure (node_script.clj:32)
shadow.build.targets.node-script/process (node_script.clj:71)
shadow.build.targets.node-script/process (node_script.clj:67)
shadow.build.targets.node-test/process (node_test.clj:96)
shadow.build.targets.node-test/process (node_test.clj:86)
clojure.lang.Var.invoke (Var.java:384)
shadow.build/process-stage/fn--14074 (build.clj:163)
shadow.build/process-stage (build.clj:160)
shadow.build/process-stage (build.clj:152)
shadow.build/configure (build.clj:420)
shadow.build/configure (build.clj:305)
shadow.cljs.devtools.api/compile* (api.clj:295)
shadow.cljs.devtools.api/compile* (api.clj:292)
shadow.cljs.devtools.cli-actual/do-build-command (cli_actual.clj:34)
shadow.cljs.devtools.cli-actual/do-build-command (cli_actual.clj:25)
shadow.cljs.devtools.cli-actual/do-build-commands (cli_actual.clj:49)
shadow.cljs.devtools.cli-actual/do-build-commands (cli_actual.clj:38)
shadow.cljs.devtools.cli-actual/main/body-fn--16426--auto----17092 (cli_actual.clj:166)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:165)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:132)
clojure.core/apply (core.clj:671)
clojure.core/apply (core.clj:662)
shadow.cljs.devtools.cli-actual/from-remote (cli_actual.clj:210)
shadow.cljs.devtools.cli-actual/from-remote (cli_actual.clj:201)
clojure.lang.Var.invoke (Var.java:393)
shadow.cljs.devtools.cli/from-remote (cli.clj:79)
shadow.cljs.devtools.cli/from-remote (cli.clj:77)
shadow.user/eval94951 (NO_SOURCE_FILE:1)
shadow.user/eval94951 (NO_SOURCE_FILE:1)
clojure.lang.Compiler.eval (Compiler.java:7194)
clojure.lang.Compiler.eval (Compiler.java:7184)
clojure.lang.Compiler.eval (Compiler.java:7149)
clojure.core/eval (core.clj:3215)
clojure.core/eval (core.clj:3211)
shadow.cljs.devtools.server.socket-repl/repl/fn--17007 (socket_repl.clj:61)
clojure.main/repl/read-eval-print--9206/fn--9209 (main.clj:437)
clojure.main/repl/read-eval-print--9206 (main.clj:437)
clojure.main/repl/fn--9215 (main.clj:458)
clojure.main/repl (main.clj:458)
clojure.main/repl (main.clj:368)
shadow.cljs.devtools.server.socket-repl/repl (socket_repl.clj:28)
shadow.cljs.devtools.server.socket-repl/repl (socket_repl.clj:26)
shadow.cljs.devtools.server.socket-repl/connection-loop (socket_repl.clj:102)
shadow.cljs.devtools.server.socket-repl/connection-loop (socket_repl.clj:72)
shadow.cljs.devtools.server.socket-repl/start/fn--17022/fn--17023/fn--17025 (socket_repl.clj:142)
error Command failed with exit code 1.
Any idea where to start looking?
:builds {:app {:target :browser
:output-dir "public/js"
:asset-path "/js"
:modules {:main ; becomes public/js/main.js
{:init-fn main/init}}}
:test {:target :node-test
:test-dir "out/tests.js"
:ns-regexp "-test$"
:autorun true}}
And I have a single test file
(ns h-test
(:require [cljs.test :refer (deftest is)]))
(deftest a-failing-test
(is (= 1 2)))
do you know how can i set a watch to run the tests on every test or source file changes?
although i have the :autorun true
, it just compiles and build, but doesn't run. when executing npx shadow-cljs compile test
it does compile and run the tests
instead create a keybinding in your editor or something and then run them manually through that when you actually want to see the results
Hello! Is there a way to set repositories
, plugin-repositories
and mirrors
in shadow-cljs? Similar to leiningen https://github.com/technomancy/leiningen/blob/github/sample.project.clj#L104-L143.
Am in an environment where I can't connect to https://repo1.maven.org/maven2/ and https://repo.clojars.org/ so will get stuck when I currently run npx shadow-cljs watch app
same as in lein, but in a :maven
map. so :maven {:repositories ...}
. either in shadow-cljs.edn
or ~/.shadow-cljs/config.edn
Also just trying my luck, but do you happen to know what else I need to configure leiningen to allow lein templates to work in an environment that can't access https://repo1.maven.org/maven2/ and https://repo.clojars.org/
I get errors like Failed to resolve version for re-frame:leiningen-template:jar:RELEASE: Could not find metadata re-frame:lein-template/maven-metadata.xml in local (/Users/.../.m2/repository)