Fork me on GitHub
#shadow-cljs
<
2021-06-26
>
theeternalpulse19:06:34

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. 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]}}}}

theeternalpulse19:06:34

I saw an issue where this might come up because a version mismatch, but both this and in package.json are using shadow-cljs 2.14.5

theeternalpulse20:06:50

the unspecified aliases looks suspicious, when I clear my .m2 repository and try to run the server again, i get tha alias error before it grabs the deps, and shadow is not a part of it. Is it not connecting the deps.edn with the shadow config?

theeternalpulse20:06:29

[fulcroapp] npx shadow-cljs -v server                                                                                                    master  ✭
shadow-cljs - config: /home/deepe/projects/clojure/fulcroapp/shadow-cljs.edn
shadow-cljs - starting via "clojure"
WARNING: Specified aliases are undeclared: [:-A]
Downloading: org/clojure/clojure/1.10.1/clojure-1.10.1.pom from 
....(oteher deps)

thheller20:06:38

@theeternalpulse can you try 2.14.4 of the npm package? the version in deps.edn can stay

theeternalpulse20:06:15

just did that, still no dice. I was able to get it working by doing clj -A:dev to get it to put those jars in the classpath and then re-run it. Seems like something is not passing in the deps.edn alias : dev

thheller20:06:52

@theeternalpulse I tried with the exact examples you pasted. just copied them into the files and it works fine

thheller20:06:30

which clj -version do you use? maybe thats too old?

theeternalpulse20:06:59

maybe, it doesn't have the -version option, I thought of upgrading that,

theeternalpulse20:06:10

let me do that and try again

thheller20:06:01

$ clj -version Clojure CLI version 1.10.3.855

theeternalpulse20:06:52

I'm on ubuntu and this is what I get

[fulcroapp] clj -version                                                                                                              
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-version (No such file or directory)

thheller20:06:31

clj --version?

thheller20:06:49

clj -Sdescribe?

theeternalpulse20:06:52

hmm, let me try removing completely

theeternalpulse20:06:04

seems there's a different one than I installed with apt

thheller20:06:14

guess its some old version if it doesn't have -version

theeternalpulse20:06:14

I think I may have installed it differently

theeternalpulse20:06:55

using -Sdescribe gives me version "1.10.1.478" but that might just be from my deps?

thheller20:06:33

no clue. I don't use deps.edn much. maybe try upgrading

theeternalpulse20:06:22

that did it, thanks for the second pair of eyes, I've been using plain old shadow-cljs for so long I didn't think that maybe clj tools were out of date

theeternalpulse20:06:51

I was just following the tutorial, I find the integration of deps a bit confusing so I'll unwind that later