shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
lucian303 2021-07-03T02:20:53.405700Z

i'm trying to upgrade (cljs 1.10.773 -> 866, shadow 2.11.24 -> 2.14.5) my re-frame / material-ui project to the latest shadow and cljs, but when i build the app, i see a ton of errors like the below. could it be a build or dependency issue? compilation has no issues and it works with the previous cljs/shadow versions. i've tried adding managed dependencies and different combinations of package versions, npm packages, etc. the npm deps are there but they don't seem to load and i'm not sure how to get it working

An error occurred when loading reagent_material_ui.styles.js
and warnings like
shadow-cljs - failed to load module$node_modules$$material_ui$core$node$ButtonBase$TouchRipple
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$material_ui$core$node$ButtonBase$ButtonBase @ ButtonBase.js:35
shadow.js.jsRequire @ js.js:66

lucian303 2021-07-03T02:24:46.405800Z

i'm seeing:

app.js:1552 TypeError: module.keyframes is not a function
    at Object.shadow$provide.module$node_modules$$material_ui$core$node$ButtonBase$TouchRipple 
with various material ui versions including beta.0 (see my post). i wonder if it's a similar issue. i get it just upgrading shadow/cljs but can't seem to resolve it

thheller 2021-07-03T06:51:27.406300Z

@lucian303 try setting :js-options {:entry-keys ["browser" "main"]} in your build config

lucian303 2021-07-03T07:49:38.407Z

unfortunately, i still get the same errors even w/ that setting in the config @thheller

pez 2021-07-03T08:29:45.408100Z

If I have something like :lein {:profile "+dev"} in my config, does that impact the release build? I’m guessing it does?

pez 2021-07-03T10:26:08.410100Z

Or, can I have :lein in the :dev map of the build? I’ve tried it and there are no complaints, but I don’t know if it is picked up.

thheller 2021-07-03T18:20:54.410900Z

@pez shadow doesn't support classpath profiles. you can configure one for lein and that always applies

thheller 2021-07-03T18:21:23.411600Z

don't really need to do it for anything. you can just run through lein directly if you really want more profiles

pez 2021-07-03T21:18:22.416Z

Not sure I follow. I’m trying to get the Luminus template to allow me to start the server and the client such that Calva can connect both REPLs. If I have :lein {:profile "+dev"} in the config, Leiningen starts like so:

shadow-cljs - running: lein with-profile +dev run -m shadow.cljs.devtools.cli --npm watch app
Which satisfies Calva’s needs, and works in development. But I am unsure how/if it impacts a release build of the client app.