Hi, I am trying to hunt down a strange bug. I have a multifunction defined in multiple files. When I start watch process, the function is not called correctly. When I modify the source file, for instance by adding a log there, Shadow logo shows in the bottom left corner and everything works fine, even after removing the added line. When I restart shadow-cljs, the problem repeats, and it also happens within release build. If I keep the log there and restart watch, the line is not printed to console.
Also reloading the app in the browser causes the same problem, again only fixed after reloading the file. If I write console.log as the top level form, it is called in the beginning. But not inside the multifn. I am running 2.11.11.
It appears so. And the code seems to work. Should I ignore these warnings? I don't get them when I compile with webpack or node.
Ok, sorry, I have found it, I had the same method overridden by another file 🙂.
you seem to have a deps.cljs
which you don't really need?
I'm not seeing that. Where would that be specified (which file)?
I can't find a file in the project named deps.cljs. my shadow-cljs.edn file contains two cljsjs packages. could that cause a problem?
:dependencies
[
[cljsjs/hash "1.1.3-0"]
[cljsjs/msgpack-lite "0.1.26-0"]
[reagent "1.0.0-alpha2"]
[reagent-utils "0.3.3"]
]
you don't need to include those cljsjs
deps since shadow-cljs will not use them anyways
don't know what they would provide
you can set :npm-deps {:install false}
. then it won't warn or attempt to install npm dependencies from deps.cljs
. something in your dependencies or you project has a deps.cljs
file which declares a :npm-deps
dependency on "@ndn/packet"
with version "@ndn/tlv@http://localhost:8000/tlv.tgz"
The package.json file for @ndn/packet (in the node_modules directory) has a dependency for the tlv.tgz file. But there isn't a deps.cljs file. And I thought I needed to have the package version specified in the shadow-cljs.edn file for packages I use. Are you saying that I should just install with npm instead of cljsjs?
Where does the :npm-deps
statement go?
Ok. I see in the User Guide section 5.2.2 that it says to use npm to manage the JS packages and not cljsjs. got it. But I still can't find where to put the :npm-deps
statement. Do I put it in my main.cljs file or create a deps.cljs file?
hi, are there any example of build hooks? what people do with this feature? https://shadow-cljs.github.io/docs/UsersGuide.html#build-hooks