Fork me on GitHub

Does anyone know why I'd be getting the following from a shadow-cljs release build?

shadow-cljs - failed to load
I'm pulling my hair out here trying to figure out what's going on.


Possibly related, all of my minified builds are giving me errors like

app.js:1994 Uncaught TypeError: $jscomp.inherits is not a function
    at app.js:1994
    at app.js:1645
    at Object.shadow$provide.<computed> (app.js:1645)
    at vs (app.js:2831)
    at app.js:2211
    at Object.shadow$provide.<computed> (app.js:2211)
    at vs (app.js:2831)
    at app.js:3230
    at app.js:3271


Trying to cut a new release of, and shit is just not working. I didn't really even change very much since the last working release and when things starting going haywire.


Last working release was 1.6.0-alpha15


There's a Makefile in there with build and release tasks which document how I've been doing this.


The Uncaught TypeError is the real issue, as it's preventing the app from loading and doing The Thing. But it seems to be related to some weird shadow shenanigans that I've been unable to sort out.


For a while the error that was coming up was a little different:

TypeError: $jscomp.asyncExecutePromiseGeneratorProgram is not a function
at La.q.runAsync (app.js:492)
at $jscomp.generator.Engine_.program_ (app.js:2153)
at $jscomp.generator.Engine_.nextStep_ (app.js:20)
at $jscomp.generator.Engine_.next_ (app.js:16)
at $ (app.js:21)
at app.js:2125
at new Promise (<anonymous>)
at N (app.js:2124)
at Pc (app.js:2148)
at $jscomp.generator.Engine_.program_ (app.js:2146)
at $jscomp.generator.Engine_.nextStep_ (app.js:20)
at $jscomp.generator.Engine_.next_ (app.js:16)
at $ (app.js:21)
at t (app.js:2124)


Tried updating shadow, and now it's the other (seemingly related) error


@metasoarous this is a problem with polyfills. I thought I fixed all those. guess I didn't. an easy fix is adding :compiler-options {:output-feature-set :es8} to your build config.


Hey @U05224H0W! Thanks for the quick response! I've verified that it's working with the :es8 featureset. Strangely though, when I then comment out that line and recompile it works again! Also, I may be crazy or have missed something, but I had it working yesterday again and then it just stopped. Is there any reason it would be misbehaving intermittently like this? Also very strange that it just magically started breaking with me not having changed very much.


did you upgrade the shadow-cljs version? I did a bunch of changes in this area in the past few releases trying to fix this. It manifests in so many different ways so I guess I missed some.


I didn't when the issue first popped up. Later I updated to try and fix it.


That's when it went from TypeError: $jscomp.asyncExecutePromiseGeneratorProgram is not a function to TypeError: $jscomp.inherits is not a function.


But the first of those errors seemingly popped up out of nowhere


One more potentially pertinent detail; While, as I said, I don't remember changing anything about my Shadow setup, I did run some devcards with shadow-cljs watch which I hadn't done in a while. And with the weirdness of turning on/off :es8 targeting fixing things, I wonder if this could have something to do with information Shadow is caching that isn't getting cleared out?


I'll see if I can reproduce this locally and try to figure out whats happening


Amazing; Thanks so much!


Hi, I'm having some trouble getting set up using shadow-cljs: npx create-cljs-project my-project All OK. cd my-project npx shadow-cljs

Could not find shadow-cljs.edn config file.
To create one run:
  shadow-cljs init
OK... It's definitely in there though. Looks like it can't find it? Using node v12.18.3. The only thing I can run is npx shadow-cljs help 😅 . Also tried installing globally, no different... Thx


@alexandercotton1996 oops I messed up the last release. just pushed 2.10.21 which fixes this. run npm install [email protected] in the project dir to fix it


Nice! That works, many thanks

👍 3

any idea why i would randomly start getting

no dispatch macro for s
for the shadow reader like so
:closure-defines  {client.config/api-base-url #shadow/env "API_URL"}


looks like a bug with a newer version


i’ll submit a bug


@benny I think the problem is that API_URL might not be set? you can try #shadow/env ["API_URL" "default-value"]?


that’s true, but in 2.10.18 it doesn’t care. that profile isn’t being used, so i wouldn’t even expect it to be evaluated


can't stop the reader from not trying to use it. for some reason the CLJS tools.reader doesn't allow reader conditionals that return nil/false. looks like a bug in tools.reader.