Hi, would appreciate if anyone could try to use this npm module @tonejs/piano
https://www.npmjs.com/package/@tonejs/piano using shadow-cljs to see if the error is just on my end. Trying to instantiate a Piano object using (Piano.) results in TypeError: Class constructor _o cannot be invoked without 'new'
and I can't figure out how to debug it.
When I execute a build for shadow-cljs, there are still some :infer-warnings
that get displayed. The default for this type of warning is false
and there is no change in behavior when I add the additional compiler-option to set that warning type to false.
Why are there some :infer-warning
types that still display during the build even though the option is turned off by default or explicitly?
------ WARNING #22 - :infer-warning --------------------------------------------
File: /ui/components/team.cljs:78:77
--------------------------------------------------------------------------------
75 | [:input {:placeholder "Username"
76 | :value username
78 | :on-change #(rf/dispatch-sync [::changeusername (.-target.value %)])}]
-----------------------------------------------------------------------------------^
Cannot infer target type in expression (. p1__110681# -target.value)
@ajarosinski use (.. % -target -value)
and the warning should go away?
surprised .-target.value
even works at all
Thanks. I couldn’t get this interop to work but I got something similar to get the build behavior to change.
Thanks!
Any idea how the wrong version of an npm dep would end up used by shadow? I just upgraded sweetalert2
from v9 to v10 in package.json
, and I verified that project/node_modules/sweetalert2
contains the published code for v10. I cleared everything from the :output-dir
and :asset-path
. However, after a shadow restart and compile, I see the code for sweetalert2 v9 in the :output-dir
again...
Oh, and I did check, ~/node_modules
doesn't have any cached version of sweetalert
try deleting .shadow-cljs/builds
. thats the cache maybe something is confused
@thheller I’ve found this particular flow a challenge when upgrading dependencies as well. It seems like this is required whenever a dependency is changed.
Do you know of a better way to ensure the shadow-cljs build is updated when upgrading dependencies other than deleting builds
?
I haven't deleted builds
in years so I don't have a clue what you are doing that makes this necessary
if you have a reproducible case please open an issue
which shadow-cljs version is this?
@thheller This is in 2.11.4. I’ll try to make a reproducible case so we can investigate further
ah, missed that one
@thheller many thanks, that worked.
Hello! How can i run backend in re-frame template?
better ask in #re-frame. shadow-cljs only handles CLJS stuff.