Why would I get WARNING] can't find node_modules/shadow-cljs/cli/dist/shadow.cljs.npm.transform.js, please install npm install --save-dev shadow-cljs.
even after I’ve run the npm install command?
looks like either have an ancient global install or ancient project install of shadow-cljs
that file hasn't existed for quite a while
That’s very possible. How to clean up?
global de-install and stick to project-only install?
project-only install means you must always run through npx shadow-cljs ...
if you are ok with that you don't need the global install at all
the global install will use the project install if its a compatible version
which it usually is ... just not if they are too far apart
What’s the cleanest way to remove the binary at /usr/local/bin/shadow-cljs so I don’t have a conflict?
npm uninstall -g shadow-cljs
seems like it works but the binary is still there
And I don’t want to just delete it, that’s sloppy
check out where it is actually from
which shadow-cljs
or so
maybe you installed it via yarn
?
ah, ok. Let’s see…
It’s acting like it removed it, but the binary is still there… :thinking_face:
just look at the file
is it a symlink? is it a bash script calling some other path?
must be from somewhere
Ah, ok. You’re right, it’s a symlink to a yarn install. But I just removed that, I thought…
I didn’t see a ‘global’ flag on yarn remove…. I’ll look again
yarn global remove
Ah, it’s a prefix….
Bingo!
I’m almost there… I’m extracting the luminus shadow config into a standalone config….
It’s complaining about `com/cognitect/transit.js:649:8 variable module is undeclared`
Is that a dev dependency I need?
thats just a warning. you can ignore that.
Hmm.. my hot reloading has disappeared….
I’m running in CIDER, and it worked when it was all in one project.clj… let me stash my changes and confirm that…
https://code.thheller.com/blog/shadow-cljs/2019/08/25/hot-reload-in-clojurescript.html
All fixed. A fresh start of emacs and cider did the trick….
So what issues will I have if my src files are separated by extension?
The manual says ‘harder to use’
your choice. if you like doing it then do it. I'm assuming you are talking about src/clj
and src/cljs
?
Correct
The last piece I’m working on today is how to get ‘env/dev/cljs’ in the source path for dev, and ‘env/prod/cljs’ for prod given that :source-paths are global and there can be only one.
must use lein or deps.edn if you need that
not supported by shadow-cljs.edn