This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-18
Channels
- # ai (2)
- # announcements (11)
- # beginners (34)
- # biff (14)
- # clerk (14)
- # clj-kondo (25)
- # clojure (27)
- # clojure-austin (1)
- # clojure-conj (6)
- # clojure-denmark (1)
- # clojure-europe (20)
- # clojure-hamburg (1)
- # clojure-nl (1)
- # clojure-norway (28)
- # clojure-uk (2)
- # clojuredesign-podcast (6)
- # clojurescript (43)
- # cursive (4)
- # data-science (2)
- # emacs (9)
- # hyperfiddle (9)
- # introduce-yourself (2)
- # jobs (3)
- # lsp (32)
- # missionary (31)
- # nbb (8)
- # off-topic (23)
- # rdf (23)
- # re-frame (10)
- # reitit (11)
- # releases (3)
- # rewrite-clj (4)
- # shadow-cljs (7)
- # specter (6)
- # sql (7)
- # xtdb (7)
I added a build hook to build a css file. I keep getting following error:
[2023-04-18 10:12:03.228 - WARNING] :shadow.cljs.devtools.server.worker.impl/cljs-compile-ex - {:input {:code "(load-file \"/\")", :ns com.vadelabs.studio.client.ui.project.interface, :repl true}}
ExceptionInfo Failed to process REPL command {:eof? false, :ns com.vadelabs.studio.client.ui.project.interface, :form (load-file "/"), :source "(load-file \"/\")", :tag :shadow.cljs.repl/process-ex}
shadow.cljs.repl/process-read-result (repl.clj:574)
shadow.cljs.repl/process-read-result (repl.clj:548)
shadow.cljs.repl/process-input (repl.clj:711)
shadow.cljs.repl/process-input (repl.clj:689)
shadow.cljs.devtools.server.worker.impl/eval19908/fn--19911 (impl.clj:698)
clojure.lang.MultiFn.invoke (MultiFn.java:234)
shadow.cljs.devtools.server.util/server-thread/fn--19548/fn--19549/fn--19557 (util.clj:283)
shadow.cljs.devtools.server.util/server-thread/fn--19548/fn--19549 (util.clj:282)
shadow.cljs.devtools.server.util/server-thread/fn--19548 (util.clj:255)
java.lang.Thread.run (Thread.java:829)
Caused by:
ExceptionInfo can only load .cljs and .cljc files {:file-path "/"}
shadow.cljs.repl/repl-load-file* (repl.clj:178)
shadow.cljs.repl/repl-load-file* (repl.clj:173)
shadow.cljs.repl/repl-load-file (repl.clj:231)
shadow.cljs.repl/repl-load-file (repl.clj:229)
shadow.cljs.repl/process-read-result (repl.clj:568)
shadow.cljs.repl/process-read-result (repl.clj:548)
[:studio] Compiling ...
My shadow-cljs.edn
looks like following:
:studio {:target :browser
:output-dir "bases/studio/resources/studio/js/"
:asset-path "/js/"
:build-options {:manifest-name "manifest.edn"}
:build-hooks [(com.vadelabs.studio.styles/build "bases/studio/resources/studio/css/styles.css")]
:module-hash-names true
:modules {:main {:init-fn com.vadelabs.studio.client.core/init
:entries [com.vadelabs.studio.client.core]}}
:devtools {:after-load com.vadelabs.studio.client.core/refresh
:preloads [;; if using the chrome extension:
com.fulcrologic.fulcro.inspect.preload
;; if using the electron app:
;com.fulcrologic.fulcro.inspect.websocket-preload
com.fulcrologic.fulcro.inspect.dom-picker-preload
com.vadelabs.studio.client.preload]}}
The hook function simply looks like following:
(defn build
{:shadow.build/stage :flush}
[build-state output-file]
(css/build output-file)
build-state)
any ideas on how can I resolve the issue? I get the error even if I remove css/build
section in the above function.I tried to look into it… but couldn’t figure it out myself… When I remove .shadow-cljs
and .cp-cache
the first build works fine. But I start seeing these errors in subsequent builds.
I am using vscode with calva. Will check that out...