Fork me on GitHub
#shadow-cljs
<
2022-06-12
>
Karan Ahlawat05:06:37

Hello, I'm trying to create a shadow-cljs project with it's dependencies listed in deps.edn. The problem I'm running into is that shadow-cljs does not find react and react-dom as deps for reagent, if I specify them in the deps.edn file. It only works if I have them installed into a node_modules folder. Ideally I'd just like to eliminate the usage of npm, and have all my deps specified in deps.edn.

thheller05:06:23

@ahlawatkaran14 JS dependencies cannot be specified in deps.edn and you need npm for them.

Karan Ahlawat05:06:48

So there's no way at all? Unfortunate, but that's life I suppose

thheller05:06:26

you don't even specify JS dependencies in shadow-cljs.edn when using only that. they always go in package.json and are managed by npm or yarn

Karan Ahlawat05:06:33

Ah, okay. I read on the reagent website that you could specify cljsjs/react and react-dom, so I thought it was possible. Maybe that was for other options than shadow-cljs

thheller05:06:33

shadow-cljs does not support cljsjs packages so those don't work

Karan Ahlawat05:06:46

Aha! Fair enough. Thanks for replying, I was really stumped. Now to figure out a good REPL workflow.