Fork me on GitHub
#shadow-cljs
<
2020-08-29
>
jmckitrick17:08:48

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?

thheller17:08:49

looks like either have an ancient global install or ancient project install of shadow-cljs

thheller17:08:58

that file hasn't existed for quite a while

jmckitrick17:08:11

That’s very possible. How to clean up?

jmckitrick17:08:29

global de-install and stick to project-only install?

thheller17:08:09

project-only install means you must always run through npx shadow-cljs ...

thheller17:08:23

if you are ok with that you don't need the global install at all

thheller17:08:10

the global install will use the project install if its a compatible version

thheller17:08:25

which it usually is ... just not if they are too far apart

jmckitrick17:08:39

What’s the cleanest way to remove the binary at /usr/local/bin/shadow-cljs so I don’t have a conflict?

jmckitrick17:08:58

npm uninstall -g shadow-cljs seems like it works but the binary is still there

jmckitrick17:08:10

And I don’t want to just delete it, that’s sloppy

thheller17:08:51

check out where it is actually from

thheller17:08:05

which shadow-cljs or so

thheller17:08:22

maybe you installed it via yarn?

jmckitrick17:08:58

ah, ok. Let’s see…

jmckitrick17:08:00

It’s acting like it removed it, but the binary is still there… :thinking_face:

thheller17:08:54

just look at the file

thheller17:08:07

is it a symlink? is it a bash script calling some other path?

thheller17:08:10

must be from somewhere

jmckitrick17:08:08

Ah, ok. You’re right, it’s a symlink to a yarn install. But I just removed that, I thought…

jmckitrick17:08:32

I didn’t see a ‘global’ flag on yarn remove…. I’ll look again

thheller17:08:31

yarn global remove

jmckitrick17:08:37

Ah, it’s a prefix….

jmckitrick17:08:58

I’m almost there… I’m extracting the luminus shadow config into a standalone config….

jmckitrick17:08:24

It’s complaining about `com/cognitect/transit.js:649:8  variable module is undeclared`

jmckitrick17:08:42

Is that a dev dependency I need?

thheller17:08:02

thats just a warning. you can ignore that.

jmckitrick17:08:56

Hmm.. my hot reloading has disappeared….

jmckitrick17:08:29

I’m running in CIDER, and it worked when it was all in one project.clj… let me stash my changes and confirm that…

jmckitrick17:08:54

All fixed. A fresh start of emacs and cider did the trick….

jmckitrick17:08:18

So what issues will I have if my src files are separated by extension?

jmckitrick17:08:27

The manual says ‘harder to use’

thheller20:08:02

your choice. if you like doing it then do it. I'm assuming you are talking about src/clj and src/cljs?

jmckitrick20:08:06

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.

thheller20:08:48

must use lein or deps.edn if you need that

thheller20:08:52

not supported by shadow-cljs.edn