Fork me on GitHub
#shadow-cljs
<
2024-01-02
>
Gabriele Lippi13:01:35

Hi, we're trying to migrate from fighweel-sidecar to shadow-cljs, I have deps.edn file where at some point a dependency is declared like this:

vincit/venia                          {:git/url ""
                                         :sha     "d8f38bd70eb348179d4adf03aeea068d948c664e"}
I was wondering if there's an equivalent for the format [library-name "version-string"] or anyway what would be the best solution for this case?

thheller13:01:16

if you are already using deps.edn just continue using deps.edn

thheller13:01:50

all you do is add the thheller/shadow-cljs dependency, same as you had with figwheel

Gabriele Lippi13:01:17

first of all thanks for replying so quickly; yes I'm already trying to do so, but I get errors because in this project they used to import js libraries with the packages from cljsjs-react etc. So I'm went back to the declaration of deps in shadow-cljs.edn but I got stucked with that thing 😅

thheller13:01:46

that doesn't change. cljsjs is not supported. doesn't matter whether you use deps.edn or not

thheller13:01:14

gotta go, be back in about two hours. happy to walk you through it if you have questions later

Gabriele Lippi13:01:37

Thank you so much, I really appreciate it 🙏

Gabriele Lippi13:01:50

this is the error I get anyway

errors in file: /home/urbest/shadow/node_modules/chart.js/dist/chart.cjs
{:js-str-offsets [], :js-esm false, :js-imports [], :js-invalid-requires [], :goog-provides [], :js-language "es5", :goog-module nil, :js-warnings [], :resource-name "node_modules/chart_DOT_js/dist/chart.cjs", :js-requires [], :js-errors [{:line 569, :column 17, :message "'(' expected"}], :goog-requires [], :tag :shadow.build.npm/errors, :uses-global-buffer false, :uses-global-process false}
ExceptionInfo: errors in file: /home/urbest/shadow/node_modules/chart.js/dist/chart.cjs
	shadow.build.npm/get-file-info* (npm.clj:535)

Gabriele Lippi13:01:19

in this case I have installed chartjs with npm and it's declared in the package.json too

thheller15:01:18

hmm yeah you are lucky I guess 😛

1
thheller15:01:45

there are some packages that use features that the closure compiler (and therefore shadow-cljs) does not support

thheller15:01:31

unfortunately that packages is one of them

thheller15:01:40

this has been pending for a long time

Gabriele Lippi15:01:35

ok, thank you very much for helping with this one, I'll find a workaround