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]}}}}
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
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?
[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)
@theeternalpulse can you try 2.14.4
of the npm package? the version in deps.edn
can stay
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
@theeternalpulse I tried with the exact examples you pasted. just copied them into the files and it works fine
which clj -version
do you use? maybe thats too old?
maybe, it doesn't have the -version option, I thought of upgrading that,
let me do that and try again
$ clj -version Clojure CLI version 1.10.3.855
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)
clj --version
?
clj -Sdescribe
?
hmm, let me try removing completely
seems there's a different one than I installed with apt
guess its some old version if it doesn't have -version
I think I may have installed it differently
using -Sdescribe gives me version "1.10.1.478"
but that might just be from my deps?
no clue. I don't use deps.edn much. maybe try upgrading
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
I was just following the tutorial, I find the integration of deps a bit confusing so I'll unwind that later