Fork me on GitHub
#shadow-cljs
<
2021-08-08
>
Drew Verlee01:08:50

What command are you running to get that error?

Chris McCormick02:08:05

I wonder if I can solve the problem of "cljs project npm deps don't get picked up" by shipping my library on npm in the following way: • Build index.js with ^export s for JavaScript consumers. • Ship cljs source up to npm also. • cljs consumers can add node_modules/mylibrary/src to their :source-paths and add the library to package.json instead of using other deps mechanisms (as they do now with js deps). I wonder if it would be interesting/good if shadow-cljs automatically pickedup cljs sources from inside node_modules subdirs and added them to the cljs classpath so that this could become a standard practice for shipping cljs libs on npm? :thinking_face:

thheller06:08:02

@chris358 what do you mean by "cljs project npm deps don't get picked up". shipping to npm will not solve anything and shadow-cljs will not pick up sources from node_modules ever. do not ship cljs libraries to npm. please describe the problem you are trying to solve more. is it just declaring npm dependencies so that projects depending on your CLJS lib can pick them up?

thheller06:08:07

if thats the case you can declare them in a deps.cljs file in the library containing {:npm-deps {"some-dep" "version"}}

👍 3
Chris McCormick06:08:18

Thanks will try that.