hi all, is there a way to tell shadow-cljs to just download deps?
shadow-cljs classpath
will do that
ok, thanks @thheller
Hi, I just started my first Shadow project... yeah... and straight after adding my first NPM module I am getting this error: Illegal variable reference before declaration: a
any idea what I can do to get rid of this?
Hey everyone! Perhaps a dumb question but what is the preferred route to running a full stack (clj + cljs) clojure project? I currently have three directories: client
, backend
, common
which refer to cljs
, clj
and ‘cljc’ respectively. My client uses shadow-cljs and after doing some reading I noticed that there are two ways to run shadow.
1. Via npm
2. Via lein
I’m confused on what is preferred here. I assume with running the client project via npm I would still get access to the repl right?
I also noticed that in lein generated projects the top level directory has a project.clj
file and both the client and backend run off of lein. Ive noticed the same thing with luminus too and I am confused what is the preferred route.
It seems like running shadow via npm and the backend clj project via lein would be right but what i mentioned above makes me hesitant that it is the "right way"
let me know if i should be asking this in #beginners !
@thomas hard to say without more info. what npm package is causing this?
that is weird indeed. not surprising the Closure compiler is complaining about that.
is there a way to make sure the Closure compiler ignores this code?
I don't think so
dang
I think I can workaround this for the moment by getting this from the CDN.
I run my backend via lein and all frontend related stuff via shadow-cljs/npm
that works well for me
others prefer to run everything via lein
up to personal preference I guess
I also have only one src/main
that houses all .clj/s/c
files but namespaced accordingly
so src/main/acme/project/frontend.cljs
etc
word thanks a ton @thheller! my structure is
src/project_name/{client,backend,common}
ok cool im going to go your route since i like it as well. just need to make Calva play nice with it!btw I never let my editor launch my REPLs
I only connect to them remotely
dunno how calva handles things by default
interesting! i am still fairly new to clojure so i only know of calva or cursive
do you have other recs?
The precise error I'm getting is this:
Closure compilation failed with 1 errors
--- node_modules/ibmcloud-appid-js/dist/appid.umd.min.js:44
Illegal variable reference before declaration: a
I only use cursive
not a clue. this is an error from the closure compiler. either it is actually invalid code in the library or something the compiler didn't understand properly.
the code does look somewhat odd so hard to say
jsrsasign: a = a,
looks weird