Fork me on GitHub
#shadow-cljs
<
2021-11-04
>
restenb10:11:08

any fix for OutOfMemoryError using shadow-cljs? I recently started encountering this, using shadow for our frontend build.

restenb10:11:25

[2021-11-04 11:03:49.953 - WARNING] :shadow.cljs.devtools.server.util/handle-ex - {:msg {:type :start-autobuild}} OutOfMemoryError unable to create new native thread

restenb10:11:41

ok, figured it out I guess. should have checked java -version first. due to messed up system PATH issues, version 1.8 was being picked up instead of 1.11. shadow-cljs build fails on 1.8 I guess.

thheller18:11:09

shadow-cljs works absolutely fine with 1.8. OutOfMemory means exactly that. Meaning your machine did not have enough available Memory to complete the operation. 1.11 got slightly better memory management so it might last a while longer but it'll not protect from it.

thheller18:11:17

regardless this has nothing to do with shadow-cljs per se. You can try to limit the amount of memory shadow-cljs gets via :jvm-opts ["-Xmx512M"] in shadow-cljs.edn but that can still OOM if your system is not able to provide 512mb of ram when needed

lilactown17:11:00

when I reference a private var in another ns, I don't see any warnings like I would expect.

thheller19:11:09

please check with the regular compiler. no clue if there is supposed to be a warning or if it needs to be enabled manually.

1
thheller19:11:19

private vars kinda suck so I never use them anyways 😛

thheller20:11:17

everyone running into issues with mui5 or other JS libs having weird TypeError: (0 , _app._registerComponent) is not a function like errors please try shadow-cljs 2.15.13

🙏 1
1
Hukka07:11:23

This has been quite elusive, and seems to go away when trying to pinpoint the root cause. But we have been seeing these a couple of times within the last month, so hopefully that's the end of it.

thheller20:11:48

that bumps to the latest cljs release and more importantly the latest closure compiler release which seems to have fixed that issue as far as I can tell

thheller20:11:53

^ @martinklepsch (should also fix that firebase issue)

martinklepsch18:11:09

I tried with 2.16.3 just now and am still seeing TypeError: (0 , _app._registerComponent) is not a function It does seem like the upgrade itself worked though as evident by some warnings related to use of unrequired namespaces

thheller20:11:16

hmm? I don't understand what you mean? what warnings about unrequired namespaces?

martinklepsch14:11:21

Stuff similar to assuming goog.object already being loaded. It’s most likely not related to the issue we’re encountering, just mentioning as a signal that the update took effect

thheller14:11:56

basically if you have any direct use of goog.object (or a macro that generates that) it'll break now

thheller14:11:23

the namespace using goog.object must have a require for it, which in case of macros most likely won't be the case

thheller14:11:39

but none of this has anything to do with TypeError: (0 , _app._registerComponent) is not a function type errors

martinklepsch15:11:07

Yes. The core of it is just that I’m still seeing this issue with the latest shadow cljs

martinklepsch18:11:09

I tried with 2.16.3 just now and am still seeing TypeError: (0 , _app._registerComponent) is not a function It does seem like the upgrade itself worked though as evident by some warnings related to use of unrequired namespaces