Fork me on GitHub
#fulcro
<
2021-06-26
>
theeternalpulse14:06:02

Trying to follow the fulcro developer guide from scratch. have all the basic deps and shadow config, startup script and html setup but when I run npx shadow-cljs server I get the following error

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 copied the configs so not sure what's missing.

lgessler15:06:41

I get that error a lot when I'm missing a development alias in deps.edn... double check whether the alias that includes devtools is being included perhaps?

lgessler15:06:06

(devtools is usually an extra dep included in an alias instead of a core dep)

theeternalpulse15:06:11

my deps.edn

{:paths   ["src/main" "resources"]
 :deps    {org.clojure/clojure    {:mvn/version "1.10.1"}
           com.fulcrologic/fulcro {:mvn/version "3.5.0-RC3"}
           #_[ com.fulcrologic/fulcro {:mvn/version "3.4.22"}]}

 :aliases {:dev {:extra-paths ["src/dev"]

                 :extra-deps  {org.clojure/clojurescript {:mvn/version "1.10.866"}
                               thheller/shadow-cljs      {:mvn/version "2.14.5"}
                               binaryage/devtools        {:mvn/version "1.0.3"}}}}}
my shadow-cljs.edn
{:deps     {:aliases [:dev]}
 :dev-http {8000 "classpath:public"}
 :builds   {:main {:target     :browser
                   :output-dir "resources/public/js/main"
                   :asset-path "/js/main"
                   :modules    {:main {:init-fn mindjoin.client/init
                                       :entries [mindjoin.client]}}
                   :devtools   {:after-load mindjoin.client/refresh
                                :preloads   [com.fulcrologic.fulcro.inspect.preload]}}}}

theeternalpulse15:06:16

this is straight from the docs

lgessler17:06:11

i believe you need org.clojure/tools.namespace {:mvn/version "1.0.0"} under :extra-deps in :dev? edit: wait sorry, misread that error and it looks like it's shadow-related... not sure then, you might try #shadow-cljs

thheller17:06:19

@theeternalpulse the error you get when shadow-cljs is not on the classpath. unsure why it wouldn't be though. config looks ok AFAICT. I don't use deps.edn though so maybe someone else can spot the error? shadow-cljs.edn is fine and would not affect this, as long as the :deps value is set

thheller17:06:13

if this is a pure CLJS project just don't bother with aliases and just use the regular :deps

xceno19:06:00

I got the same error with the latest shadow release and simply reverted back to the older one. Had no time to do bug hunting that day. Your deps.edn looks fine otherwise. I'm on my phone right now, can try to reproduce it later

theeternalpulse19:06:22

ok, I'll try to look at a previous, and if it works I'll report an issue

theeternalpulse19:06:21

when I do clj -Spath I do not see shadow in the classpath, not sure if this is relevant to when I run with shadow-cljs

theeternalpulse21:06:56

Turned out I had to re-insatall clojure tools to use the shadow/deps combo