Fork me on GitHub

I have a project that uses Winston.js colors.js and moment-mini they all work fine with npm/yarn but under Shadow they all have: required JS dependency "async/series" is not available, it was required by "node_modules/winston/dist/winston/transports/file.js". and the recomendation to run: npm install async/serie When I try to run install it errors out and can’t find the repositories /usr/local/bin/git ls-remote -h -t it just seems to me that since this is occurring in 3 apparently unrelated instances - except for all using async/series and that it is fine in npm and only shows up in shadow I was thinking it must be trying to do something shadow doesn’t support


Isn't Winston.js just trying to load the series script from the async package, so you should npm install async itself?


@tbrooke I don't know where you are getting that git command from. that is not how npm works. npm install winston and (require '["winston" :as w]) works absolutely fine for me


the async/series message is a bit wrong. it is the async package which should have been installed when installing winston since it is once of its dependencies


will js/foo.bar_baz get munged with optimizations?


depends. usually no.


I don’t get a warning when I turn on externs inference, but it seems to break in release


ie. you have a CLJs namespace starting with foo


yes, that’s correct


then externs inference backs of and thinks you are in safe land


what’s the best way to remediate it? other than renaming the global foo


depends. why is it a problem?


the logic why externs inference backs off is that it assumes you are working on JS code that is safe to rename


given that it could be js/cljs.core.assoc or js/goog.string.startsWith


I have some external JS that sets foo.bar_baz and I need to get foo.bar_baz in some CLJS code


that seems like a problem on its own given that it clashes with the CLJS namespace structure?


yeah, not ideal. code was written before my time


I guess I’ll do gobj/get for now until I can refactor this


shadow-cljs just blew my mind, I switched my new project to release compilation and expected an evening full of pain and it worked out-of-the-box on first try!!! note that the project uses some non-trivial npm deps and also lazy loading of modules @thheller kudos!

👍 24
🎉 4